about summary refs log tree commit diff
path: root/kindlecomicconverter/comic2panel.py
diff options
context:
space:
mode:
authorPaweł Jastrzębski <pawelj@iosphe.re>2017-11-02 10:28:43 +0100
committerPaweł Jastrzębski <pawelj@iosphe.re>2017-11-02 10:28:43 +0100
commita695a4c151765e983126a6037c589aa91452e554 (patch)
tree80303dc7c4f601f2bef69157f711ec8394ce9a80 /kindlecomicconverter/comic2panel.py
parentUpdated build enviroment (diff)
downloadkcc-a695a4c151765e983126a6037c589aa91452e554.tar.gz
kcc-a695a4c151765e983126a6037c589aa91452e554.tar.bz2
kcc-a695a4c151765e983126a6037c589aa91452e554.zip
Code cleanup
Diffstat (limited to 'kindlecomicconverter/comic2panel.py')
-rw-r--r--kindlecomicconverter/comic2panel.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/kindlecomicconverter/comic2panel.py b/kindlecomicconverter/comic2panel.py
index 14b3294..03093e0 100644
--- a/kindlecomicconverter/comic2panel.py
+++ b/kindlecomicconverter/comic2panel.py
@@ -93,6 +93,7 @@ def splitImageTick(output):
             splitWorkerPool.terminate()
 
 
+# noinspection PyUnboundLocalVariable
 def splitImage(work):
     try:
         path = work[0]
@@ -140,9 +141,7 @@ def splitImage(work):
 
             if opt.debug:
                 for panel in panelsProcessed:
-                    # noinspection PyUnboundLocalVariable
                     draw.rectangle([(0, panel[0]), (widthImg, panel[1])], (0, 255, 0, 128), (0, 0, 255, 255))
-                # noinspection PyUnboundLocalVariable
                 debugImage = Image.alpha_composite(imgOrg.convert(mode='RGBA'), drawImg)
                 debugImage.save(os.path.join(path, os.path.splitext(name)[0] + '-debug.png'), 'PNG')
 
@@ -185,7 +184,7 @@ def splitImage(work):
         return str(sys.exc_info()[1]), sanitizeTrace(sys.exc_info()[2])
 
 
-def main(argv=None, qtGUI=None):
+def main(argv=None, qtgui=None):
     global options, GUI, splitWorkerPool, splitWorkerOutput, mergeWorkerPool, mergeWorkerOutput
     parser = OptionParser(usage="Usage: kcc-c2p [options] comic_folder", add_help_option=False)
     mainOptions = OptionGroup(parser, "MANDATORY")
@@ -203,8 +202,8 @@ def main(argv=None, qtGUI=None):
     parser.add_option_group(mainOptions)
     parser.add_option_group(otherOptions)
     options, args = parser.parse_args(argv)
-    if qtGUI:
-        GUI = qtGUI
+    if qtgui:
+        GUI = qtgui
     else:
         GUI = None
     if len(args) != 1: