From: Fede Date: Sat, 6 Oct 2007 15:59:55 +0000 (-0300) Subject: Update services.util errors to be unicode compatible. X-Git-Url: https://git.llucax.com/software/pymin.git/commitdiff_plain/1387b81089b4c053c0f07447fafe36e6b6394d7e?ds=sidebyside Update services.util errors to be unicode compatible. --- diff --git a/pymin/services/util.py b/pymin/services/util.py index a61045c..e5aa202 100644 --- a/pymin/services/util.py +++ b/pymin/services/util.py @@ -26,13 +26,7 @@ class Error(HandlerError): message - A descriptive error message. """ - - def __init__(self, message): - r"Initialize the object. See class documentation for more info." - self.message = message - - def __str__(self): - return self.message + pass class ReturnNot0Error(Error): r""" @@ -47,7 +41,7 @@ class ReturnNot0Error(Error): r"Initialize the object. See class documentation for more info." self.return_value = return_value - def __str__(self): + def __unicode__(self): return 'The command returned %d' % self.return_value class ExecutionError(Error): @@ -66,7 +60,7 @@ class ExecutionError(Error): self.command = command self.error = error - def __str__(self): + def __unicode__(self): command = self.command if not isinstance(self.command, basestring): command = ' '.join(command)