# This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
-import os
import re
import urllib
from .utils import XMLNamespace
message = unicode(args, encoding='utf-8', errors='ignore')
return message
+
class ParseError(UnicodeException):
pass
+
class ValidationError(UnicodeException):
pass
+# was deleted, but still used???
+class NoDublinCore(ValidationError):
+ pass
+
+
+class BuildError(Exception):
+ pass
+
+
class EmptyNamespace(XMLNamespace):
def __init__(self):
super(EmptyNamespace, self).__init__('')
slug = None
example = 'http://wolnelektury.pl/katalog/lektura/template/'
- _re_wl_uri = re.compile(r'http://(www\.)?wolnelektury.pl/katalog/lektura/'
- '(?P<slug>[-a-z0-9]+)/?$')
+ _re_wl_uri = re.compile(r'http://(www\.)?wolnelektury.pl/katalog/lektura/(?P<slug>[-a-z0-9]+)/?$')
def __init__(self, uri):
uri = unicode(uri)
class URLOpener(urllib.FancyURLopener):
version = 'FNP Librarian (http://git.nowoczesnapolska.org.pl/?p=librarian.git)'
urllib._urlopener = URLOpener()
-