From b7789751fcf0d8ec5637c104be1224e137e7485d Mon Sep 17 00:00:00 2001 From: Federico Leva Date: Tue, 22 May 2018 10:30:11 +0300 Subject: [PATCH] UnboundLocalError: local variable 'reply' referenced before assignment Warning!: "./tdicampswikiacom-20180522-wikidump" path exists Traceback (most recent call last): File "./dumpgenerator.py", line 2321, in main() File "./dumpgenerator.py", line 2283, in main while reply.lower() not in ['yes', 'y', 'no', 'n']: UnboundLocalError: local variable 'reply' referenced before assignment --- dumpgenerator.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dumpgenerator.py b/dumpgenerator.py index 6b70dcd..6212f8f 100755 --- a/dumpgenerator.py +++ b/dumpgenerator.py @@ -1858,10 +1858,9 @@ def checkXMLIntegrity(config={}, titles=[], session=None): pass else: print 'XML dump seems to be corrupted.' + reply = '' if config['failfast']: reply = 'yes' - else: - reply = '' while reply.lower() not in ['yes', 'y', 'no', 'n']: reply = raw_input('Regenerate a new dump ([yes, y], [no, n])? ') if reply.lower() in ['yes', 'y']: