import os
class ParseError(Exception):
- pass
+ def __str__(self):
+ """ Dirty workaround for Python Unicode handling problems. """
+ return self.message.message
+
+ def __unicode__(self):
+ """ Dirty workaround for Python Unicode handling problems. """
+ return self.message.message
class ValidationError(Exception):
pass
print '%(file)s:%(name)s:%(message)s' % {
'file': main_input,
'name': e.__class__.__name__,
- 'message': e.message
+ 'message': e
}
print '%(file)s:%(name)s:%(message)s' % {
'file': input_filename,
'name': e.__class__.__name__,
- 'message': e.message
+ 'message': e,
}
except IOError, e:
print '%(file)s:%(name)s:%(message)s' % {
print '%(file)s:%(etype)s:%(message)s' % {
'file': input_filename,
'etype': e.__class__.__name__,
- 'message': e.message,
+ 'message': e,
}
raise
print '%(file)s:%(name)s:%(message)s; use -v to see more output' % {
'file': main_input,
'name': e.__class__.__name__,
- 'message': e.message
+ 'message': e
}
print '%(file)s:%(name)s:%(message)s' % {
'file': input_filename,
'name': e.__class__.__name__,
- 'message': e.message
+ 'message': e
}
except IOError, e:
print '%(file)s:%(name)s:%(message)s' % {
print '%(file)s:%(etype)s:%(message)s' % {
'file': input_filename,
'etype': e.__class__.__name__,
- 'message': e.message,
+ 'message': e,
}
raise