From 08c402149b3d8e15d7e941e27757239953be44c0 Mon Sep 17 00:00:00 2001 From: Alban Seurat Date: Sat, 21 Mar 2015 14:32:55 +0100 Subject: [PATCH] Prevent error when no file has been detected Script raised an unhandled exception: local variable 'fmt_str' referenced before assignment Traceback (most recent call last): File "/volume1/@appstore/comictagger/comictaggerlib/options.py", line 233, in launch_script script.main() File "/volume1/@appstore/comictagger/scripts/move2folder.py", line 90, in main print >> sys.stderr, fmt_str.format("") UnboundLocalError: local variable 'fmt_str' referenced before assignment --- scripts/move2folder.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/move2folder.py b/scripts/move2folder.py index c056c45..237e375 100755 --- a/scripts/move2folder.py +++ b/scripts/move2folder.py @@ -76,6 +76,7 @@ def main(): print "Reading in all comics..." comic_list = [] max_name_len = 2 + fmt_str = "" for filename in filelist: ca = ComicArchive(filename, settings.rar_exe_path, ComicTaggerSettings.getGraphic('nocover.png')) if ca.seemsToBeAComicArchive() and ca.hasMetadata(style):