[IMP] Improved warning messages for resource module
bzr revid: pso@tinyerp.com-20120725124945-pgebt9fh69mpb82i
This commit is contained in:
parent
c7060ffa18
commit
082513a805
|
@ -91,8 +91,8 @@ class _IncompleteError(Exception):
|
||||||
Exception.__init__(self, *args)
|
Exception.__init__(self, *args)
|
||||||
else:
|
else:
|
||||||
Exception.__init__(self,
|
Exception.__init__(self,
|
||||||
"not enough data for calculating task, "\
|
"Not enough data for calculating task, "\
|
||||||
"maybe you have a recursive reference",
|
"maybe you have a recursive reference.",
|
||||||
*args)
|
*args)
|
||||||
#@-node:__init__
|
#@-node:__init__
|
||||||
#@-others
|
#@-others
|
||||||
|
@ -1997,7 +1997,7 @@ class Task(object):
|
||||||
except IndexError:
|
except IndexError:
|
||||||
raise AttributeError()
|
raise AttributeError()
|
||||||
|
|
||||||
exception = AttributeError("'%s' is not a valid attribute of '%s'"
|
exception = AttributeError("'%s' is not a valid attribute of '%s'."
|
||||||
% (name, self.path))
|
% (name, self.path))
|
||||||
exception.is_frozen = self._is_frozen
|
exception.is_frozen = self._is_frozen
|
||||||
raise exception
|
raise exception
|
||||||
|
@ -2925,7 +2925,7 @@ class Task(object):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
dest, dattr = self.__at_compile
|
dest, dattr = self.__at_compile
|
||||||
raise RecursionError("Recursive definition of %s(%s) and %s(%s)" \
|
raise RecursionError("Recursive definition of %s(%s) and %s(%s)." \
|
||||||
% (self.path, attrib_name, dest.path, dattr))
|
% (self.path, attrib_name, dest.path, dattr))
|
||||||
except AttributeError: pass
|
except AttributeError: pass
|
||||||
|
|
||||||
|
@ -3325,7 +3325,7 @@ class Task(object):
|
||||||
#@+node:__assert
|
#@+node:__assert
|
||||||
def __assert(self, value):
|
def __assert(self, value):
|
||||||
if not value:
|
if not value:
|
||||||
warnings.warn('assertion in scenario: "%s"' % self.scenario,
|
warnings.warn('Assertion in scenario: "%s".' % self.scenario,
|
||||||
RuntimeWarning, 2)
|
RuntimeWarning, 2)
|
||||||
#@-node:__assert
|
#@-node:__assert
|
||||||
#@+node:_warn
|
#@+node:_warn
|
||||||
|
|
Loading…
Reference in New Issue