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
def serialize_children(element, format='raw'):
return SERIALIZERS[format](element)
+
+def get_resource(path):
+ return os.path.join(os.path.dirname(__file__), path)
+