From 84b462901aece7eda7ef1704c748a5e5b4b3df26 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Thu, 21 Jan 2016 15:01:34 +0100 Subject: [PATCH] removed dependency from wolnelektury --- librarian/__init__.py | 2 +- librarian/packagers.py | 2 +- librarian/partners.py | 2 +- librarian/util.py | 7 +++++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/librarian/__init__.py b/librarian/__init__.py index d307def..0c77901 100644 --- a/librarian/__init__.py +++ b/librarian/__init__.py @@ -10,7 +10,7 @@ import re import shutil import urllib -from wolnelektury.utils import makedirs +from util import makedirs class UnicodeException(Exception): diff --git a/librarian/packagers.py b/librarian/packagers.py index b3ae955..f57a983 100644 --- a/librarian/packagers.py +++ b/librarian/packagers.py @@ -7,7 +7,7 @@ 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): diff --git a/librarian/partners.py b/librarian/partners.py index dccb5b6..33198f7 100644 --- a/librarian/partners.py +++ b/librarian/partners.py @@ -13,7 +13,7 @@ New partners shouldn't be added here, but in the partners repository. """ from librarian import packagers, cover -from wolnelektury.utils import makedirs +from util import makedirs class GandalfEpub(packagers.EpubPackager): diff --git a/librarian/util.py b/librarian/util.py index 396c84b..0886fd5 100644 --- a/librarian/util.py +++ b/librarian/util.py @@ -2,6 +2,8 @@ # by Paul Winkler # http://code.activestate.com/recipes/81611-roman-numerals/ # PSFL (GPL compatible) +import os + def int_to_roman(input): """ @@ -115,3 +117,8 @@ def roman_to_int(input): return sum else: raise ValueError, 'input is not a valid roman numeral: %s' % input + + +def makedirs(path): + if not os.path.isdir(path): + os.makedirs(path) \ No newline at end of file -- 2.20.1