class UnicodeException(Exception):
def __str__(self):
""" Dirty workaround for Python Unicode handling problems. """
args = self.args[0] if len(self.args) == 1 else self.args
try:
class UnicodeException(Exception):
def __str__(self):
""" Dirty workaround for Python Unicode handling problems. """
args = self.args[0] if len(self.args) == 1 else self.args
try:
DCNS = XMLNamespace('http://purl.org/dc/elements/1.1/')
XHTMLNS = XMLNamespace("http://www.w3.org/1999/xhtml")
PLMETNS = XMLNamespace("http://dl.psnc.pl/schemas/plmet/")
DCNS = XMLNamespace('http://purl.org/dc/elements/1.1/')
XHTMLNS = XMLNamespace("http://www.w3.org/1999/xhtml")
PLMETNS = XMLNamespace("http://dl.psnc.pl/schemas/plmet/")
"""Base class for a repository of XML files.
Used for generating joined files, like EPUBs.
"""Base class for a repository of XML files.
Used for generating joined files, like EPUBs.
elif self._filename is not None:
return open(self._filename, 'rb')
elif self._filename is not None:
return open(self._filename, 'rb')