* i18n fix for str method of exception classes
This commit is contained in:
+14
-2
@@ -16,11 +16,23 @@ __all__ = [ 'api', 'packagedb', 'installdb' ]
|
||||
|
||||
class Error(Exception):
|
||||
"""Class of exceptions that lead to program termination"""
|
||||
pass
|
||||
def __str__(self):
|
||||
s = ''
|
||||
for x in self.args:
|
||||
if s != '':
|
||||
s += '\n'
|
||||
s += x.encode('utf-8')
|
||||
return s
|
||||
|
||||
class Exception(Exception):
|
||||
"""Class of exceptions that must be caught and handled within PISI"""
|
||||
pass
|
||||
def __str__(self):
|
||||
s = ''
|
||||
for x in self.args:
|
||||
if s != '':
|
||||
s += '\n'
|
||||
s += x.encode('utf-8')
|
||||
return s
|
||||
|
||||
# FIXME: can't do this due to name clashes in config and other singletons booo
|
||||
#from pisi.api import *
|
||||
|
||||
Reference in New Issue
Block a user