[rhmessaging-commits] rhmessaging commits: r2083 - in mgmt/cumin/python: wooly and 1 other directory.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Wed May 28 15:10:41 EDT 2008
Author: justi9
Date: 2008-05-28 15:10:41 -0400 (Wed, 28 May 2008)
New Revision: 2083
Modified:
mgmt/cumin/python/cumin/exchange.py
mgmt/cumin/python/cumin/widgets.py
mgmt/cumin/python/wooly/__init__.py
mgmt/cumin/python/wooly/forms.py
Log:
Rename Error to FormError to avoid potential collisions
Modified: mgmt/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/cumin/python/cumin/exchange.py 2008-05-28 14:57:36 UTC (rev 2082)
+++ mgmt/cumin/python/cumin/exchange.py 2008-05-28 19:10:41 UTC (rev 2083)
@@ -274,7 +274,7 @@
error = EmptyInputError(exchange_name)
self.exchange_name.add_error(session, error)
elif " " in name:
- error = Error("""
+ error = FormError("""
The exchange name is invalid; allowed characters are
letters, digits, ".", and "_"
""")
Modified: mgmt/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/cumin/python/cumin/widgets.py 2008-05-28 14:57:36 UTC (rev 2082)
+++ mgmt/cumin/python/cumin/widgets.py 2008-05-28 19:10:41 UTC (rev 2083)
@@ -538,7 +538,7 @@
if self.legal_chars_desc:
msg = msg + "; " + self.legal_chars_desc
- errors.append(Error(msg))
+ errors.append(FormError(msg))
break
@@ -570,7 +570,7 @@
if results.count() > 0:
errors.append(DuplicateValueError())
-class DuplicateValueError(Error):
+class DuplicateValueError(FormError):
def __init__(self, fld="name"):
super(DuplicateValueError, self).__init__()
Modified: mgmt/cumin/python/wooly/__init__.py
===================================================================
--- mgmt/cumin/python/wooly/__init__.py 2008-05-28 14:57:36 UTC (rev 2082)
+++ mgmt/cumin/python/wooly/__init__.py 2008-05-28 19:10:41 UTC (rev 2083)
@@ -604,13 +604,6 @@
return "%s(trunk=%s,app=%s)" % \
(self.__class__.__name__, self.trunk, self.app)
-class Error(object):
- def __init__(self, message=None):
- self.message = message
-
- def get_message(self, session):
- return self.message
-
class StringIOWriter(object):
def __init__(self):
self.writer = StringIO()
Modified: mgmt/cumin/python/wooly/forms.py
===================================================================
--- mgmt/cumin/python/wooly/forms.py 2008-05-28 14:57:36 UTC (rev 2082)
+++ mgmt/cumin/python/wooly/forms.py 2008-05-28 19:10:41 UTC (rev 2083)
@@ -91,11 +91,18 @@
def render_disabled_attr(self, session, *args):
return self.disabled and "disabled=\"disabled\"" or None
-class MissingValueError(Error):
+class FormError(object):
+ def __init__(self, message=None):
+ self.message = message
+
def get_message(self, session):
+ return self.message
+
+class MissingValueError(FormError):
+ def get_message(self, session):
return "This value is required"
-class EmptyInputError(Error):
+class EmptyInputError(FormError):
def __init__(self):
message = "This value is required"
More information about the rhmessaging-commits
mailing list