From b6fa993c1755a8b19f5a0a7746b45b3080850df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jastrz=C4=99bski?= Date: Fri, 8 Mar 2013 17:05:17 +0100 Subject: [PATCH] Fixed splitCount global --- kcc/comic2ebook.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py index 53cb599..92026a7 100755 --- a/kcc/comic2ebook.py +++ b/kcc/comic2ebook.py @@ -266,9 +266,7 @@ def applyImgOptimization(img, isSplit=False, toRight=False): def dirImgProcess(path): - global options - global splitCount - splitCount = 0 + global options, splitCount if options.righttoleft: facing = "right" else: @@ -428,7 +426,7 @@ def Usage(): def main(argv=None): - global parser, options, epub_path + global parser, options, epub_path, splitCount usage = "Usage: %prog [options] comic_file|comic_folder" parser = OptionParser(usage=usage, version=__version__) parser.add_option("-p", "--profile", action="store", dest="profile", default="KHD", @@ -467,6 +465,7 @@ def main(argv=None): path = getWorkFolder(args[0]) if options.title == 'defaulttitle': options.title = os.path.splitext(os.path.basename(args[0]))[0] + splitCount = 0 if options.imgproc: print "Processing images..." dirImgProcess(path + "/OEBPS/Images/")