Pinakin Nayi (OpenERP) has proposed merging 
lp:~openerp-commiter/openobject-addons/trunk-exception-warning-imp-dbr-resource-warning-imp-pna
 into lp:~openerp-dev/openobject-addons/trunk-exception-warning-imp-dbr.

Requested reviews:
  Kuldeep Joshi(OpenERP) (kjo-openerp)

For more details, see:
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-exception-warning-imp-dbr-resource-warning-imp-pna/+merge/114861

Hello,

  I improved the resource module warning messages as per mentioned.

Thanks,
pna
-- 
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-exception-warning-imp-dbr-resource-warning-imp-pna/+merge/114861
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-exception-warning-imp-dbr.
=== modified file 'resource/faces/pcalendar.py'
--- resource/faces/pcalendar.py	2011-12-19 16:54:40 +0000
+++ resource/faces/pcalendar.py	2012-07-13 13:27:36 +0000
@@ -74,7 +74,7 @@
 
     mo = TIME_RANGE_PATTERN.match(src)
     if not mo:
-        raise ValueError("%s is no time range" % src)
+        raise ValueError("%s is no time range." % src)
 
     from_time = int(mo.group(1)) * 60 + int(mo.group(2))
     to_time   = int(mo.group(3)) * 60 + int(mo.group(4))
@@ -125,7 +125,7 @@
         except Exception, e:
             pass
 
-    raise TypeError("'%s' (%s) is not a datetime" % (src, str(type(src))))
+    raise TypeError("'%s' (%s) is not a datetime." % (src, str(type(src))))
 #@-node:
 #@+node:_to_days
 def _to_days(src):
@@ -150,7 +150,7 @@
                        "sun" : 6 } [ lower(t.strip()) ]
             result[index] = 1
         except:
-            raise ValueError("%s is not a day" % (t))
+            raise ValueError("%s is not a day." % (t))
 
     return result
 #@-node:_to_days
@@ -232,7 +232,7 @@
         src = "%sM" % str(src)
 
     if not isinstance(src, basestring):
-        raise ValueError("%s is not a duration" % (repr(src)))
+        raise ValueError("%s is not a duration." % (repr(src)))
 
     src = src.strip()
 
@@ -273,7 +273,7 @@
         if not mo:
             raise ValueError(src +
                              " is not a valid duration: valid"
-                             " units are: d w m y M H")
+                             " units are: d w m y M H.")
 
         unit = mo.group(3)
         val = float(mo.group(1))

=== modified file 'resource/faces/resource.py'
--- resource/faces/resource.py	2011-12-19 16:54:40 +0000
+++ resource/faces/resource.py	2012-07-13 13:27:36 +0000
@@ -404,7 +404,7 @@
         if self.__task:
             return getattr(self.__task, name)
 
-        raise AttributeError("'%s' is not a valid attribute" % (name))
+        raise AttributeError("'%s' is not a valid attribute." % (name))
     #@-node:__getattr__
     #@-others
 #@-node:class Booking

=== modified file 'resource/faces/task.py'
--- resource/faces/task.py	2011-12-19 16:54:40 +0000
+++ resource/faces/task.py	2012-07-13 13:27:36 +0000
@@ -971,7 +971,7 @@
         balance = SLOPPY
 
     if balance != SLOPPY:
-        raise RuntimeError("You may specify variable_load only with balance=SLOPPY")
+        raise RuntimeError("You may specify variable_load only with balance=SLOPPY.")
 
     return -limit
 #@-node:VariableLoad
@@ -2295,7 +2295,7 @@
             try:
                 if not isinstance(res, (resource.Resource,
                                         resource._MetaResource)):
-                    raise ValueError("the resource '%s' is unknown." %  res)
+                    raise ValueError("The resource '%s' is unknown." %  res)
 
                 start = _to_datetime(start)
                 end = _to_datetime(end)
@@ -2432,7 +2432,7 @@
             #@        << raise child recursion error >>
             #@+node:<< raise child recursion error >>
             self._raise(RecursionError("A child defines a "\
-                                       "recursive definition at %s" % self.path))
+                                       "recursive definition at %s." % self.path))
             #@-node:<< raise child recursion error >>
             #@nl
         except AttributeError:
@@ -2598,7 +2598,7 @@
             #@        << set userdefined attribute >>
             #@+node:<< set userdefined attribute >>
             if callable( getattr(self.__class__, name, None)):
-                raise NameError('You may not use "%s" as attribute' % name)
+                raise NameError('You may not use "%s" as attribute.' % name)
 
             setattr(self, name, value)
             self._properties[name] = True
@@ -2990,7 +2990,7 @@
                 #@            << raise child recursion error >>
                 #@+node:<< raise child recursion error >>
                 self._raise(RecursionError("A child defines a "\
-                                           "recursive definition at %s" % self.path))
+                                           "recursive definition at %s." % self.path))
                 #@-node:<< raise child recursion error >>
                 #@nl
 
@@ -3009,8 +3009,8 @@
             if start: return to_start(start)
             #@        << raise recursion error >>
             #@+node:<< raise recursion error >>
-            raise RecursionError("you have to specify a "\
-                                 "start or an end at %s" % self.path)
+            raise RecursionError("You have to specify a "\
+                                 "start or an end at %s." % self.path)
             #@nonl
             #@-node:<< raise recursion error >>
             #@nl
@@ -3030,7 +3030,7 @@
                 #@            << raise child recursion error >>
                 #@+node:<< raise child recursion error >>
                 self._raise(RecursionError("A child defines a "\
-                                           "recursive definition at %s" % self.path))
+                                           "recursive definition at %s." % self.path))
                 #@-node:<< raise child recursion error >>
                 #@nl
 
@@ -3049,8 +3049,8 @@
             if end: return to_end(end)
             #@        << raise recursion error >>
             #@+node:<< raise recursion error >>
-            raise RecursionError("you have to specify a "\
-                                 "start or an end at %s" % self.path)
+            raise RecursionError("You have to specify a "\
+                                 "start or an end at %s." % self.path)
             #@nonl
             #@-node:<< raise recursion error >>
             #@nl
@@ -3251,7 +3251,7 @@
 
         if not (start or end):
             self._raise(ValueError("You must specify either a"\
-                                   " start or an end attribute"))
+                                   " start or an end attribute."))
 
         if start and end: return
 
@@ -3272,7 +3272,7 @@
         self.length = self._to_delta(0)
         start = self.__dict__.get("start")
         if not start:
-            self._raise(ValueError("Milestone must have start attribute"),
+            self._raise(ValueError("Milestone must have start attribute."),
                                    "milstone")
 
         if self.__start_class.__name__ == "edt":

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to