From 64d5edc7951035a9ca36fa185eefe8309eff8431 Mon Sep 17 00:00:00 2001 From: Clay Mitchell Date: Fri, 11 Jan 2013 22:32:34 -0500 Subject: [PATCH] fixed manual pull error Saw this error: UnboundLocalError: local variable 'modcomicnm' referenced before assignment Added one line to make sure modcomicnm was initialized --- mylar/weeklypull.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mylar/weeklypull.py b/mylar/weeklypull.py index 4ce638d6..689b2225 100755 --- a/mylar/weeklypull.py +++ b/mylar/weeklypull.py @@ -419,8 +419,10 @@ def pullitcheck(comic1off_name=None,comic1off_id=None): comicnm = re.sub('[\_\#\,\/\:\;\.\-\!\$\%\&\+\'\?\@]', '', str(comicnm)) watchcomic = re.sub(r'\s', '', watchcomic) comicnm = re.sub(r'\s', '', comicnm) + modcomicnm = '' logger.fdebug("Revised_Watch: " + str(watchcomic)) logger.fdebug("ComicNM: " + str(comicnm)) + if 'THE' in str(watchcomic): modcomicnm = re.sub('THE', '', comicnm) if str(comicnm) == str(watchcomic).upper() or str(modcomicnm) == str(watchcomic).upper():