From b8c945f1510f3573c7ef2ff05ce529e6373bf2a9 Mon Sep 17 00:00:00 2001 From: Kshitij Kotasthane Date: Thu, 15 Oct 2020 13:03:16 +0530 Subject: [PATCH] Removed global dict for questions, bound it to a local scope --- app.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app.py b/app.py index 81d8b5a..de064f4 100644 --- a/app.py +++ b/app.py @@ -12,9 +12,6 @@ UPLOAD_FOLDER = './pdf/' app = Flask(__name__) app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER -# Global quiz object -questions = dict() - @ app.route('/') def index(): @@ -27,6 +24,7 @@ def quiz(): """ Handle upload and conversion of file + other stuff """ UPLOAD_STATUS = False + questions = dict() # Make directory to store uploaded files, if not exists if not os.path.isdir('./pdf'):