fnp
/
librarian.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix verse numbering.
[librarian.git]
/
librarian
/
packagers.py
diff --git
a/librarian/packagers.py
b/librarian/packagers.py
index
b3ae955
..
b3f5548
100644
(file)
--- a/
librarian/packagers.py
+++ b/
librarian/packagers.py
@@
-3,11
+3,13
@@
# 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.
#
+from __future__ import print_function, unicode_literals
+
import os
from librarian import pdf, epub, mobi, DirDocProvider, ParseError
from librarian.parser import WLDocument
import os
from librarian import pdf, epub, mobi, DirDocProvider, ParseError
from librarian.parser import WLDocument
-from
wolnelektury.utils
import makedirs
+from
.util
import makedirs
class Packager(object):
class Packager(object):
@@
-39,14
+41,14
@@
class Packager(object):
try:
for main_input in input_filenames:
if verbose:
try:
for main_input in input_filenames:
if verbose:
- print
main_input
+ print
(main_input)
cls.prepare_file(main_input, output_dir, verbose, overwrite)
cls.prepare_file(main_input, output_dir, verbose, overwrite)
- except ParseError
,
e:
- print
'%(file)s:%(name)s:%(message)s' % {
+ except ParseError
as
e:
+ print
(
'%(file)s:%(name)s:%(message)s' % {
'file': main_input,
'name': e.__class__.__name__,
'message': e.message
'file': main_input,
'name': e.__class__.__name__,
'message': e.message
- }
+ }
)
class EpubPackager(Packager):
class EpubPackager(Packager):