fnp
/
librarian.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix pdf rendering on production
[librarian.git]
/
librarian
/
__init__.py
diff --git
a/librarian/__init__.py
b/librarian/__init__.py
index
0616f23
..
a0d70e7
100644
(file)
--- a/
librarian/__init__.py
+++ b/
librarian/__init__.py
@@
-3,7
+3,6
@@
# This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
# 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
import re
import urllib
from .utils import XMLNamespace
@@
-23,13
+22,24
@@
class UnicodeException(Exception):
message = unicode(args, encoding='utf-8', errors='ignore')
return message
message = unicode(args, encoding='utf-8', errors='ignore')
return message
+
class ParseError(UnicodeException):
pass
class ParseError(UnicodeException):
pass
+
class ValidationError(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__('')
class EmptyNamespace(XMLNamespace):
def __init__(self):
super(EmptyNamespace, self).__init__('')
@@
-53,8
+63,7
@@
class WLURI(object):
slug = None
example = 'http://wolnelektury.pl/katalog/lektura/template/'
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)
def __init__(self, uri):
uri = unicode(uri)
@@
-93,4
+102,3
@@
class WLURI(object):
class URLOpener(urllib.FancyURLopener):
version = 'FNP Librarian (http://git.nowoczesnapolska.org.pl/?p=librarian.git)'
urllib._urlopener = URLOpener()
class URLOpener(urllib.FancyURLopener):
version = 'FNP Librarian (http://git.nowoczesnapolska.org.pl/?p=librarian.git)'
urllib._urlopener = URLOpener()
-