diff options
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index 3e4644b..ddd7e01 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -1092,7 +1092,10 @@ class Question(models.Model): files_list = [] for f in files: zip_file.write(f.file.path, os.path.join("additional_files", - os.path.basename(f.file.path)) + os.path.basename( + f.file.path + ) + ) ) files_list.append(((os.path.basename(f.file.path)), f.extract)) return files_list @@ -1136,8 +1139,9 @@ class Question(models.Model): def read_yaml(self, file_path, user, files=None): msg = "Failed to upload Questions" for ext in ["yaml", "yml"]: - for yaml_file in glob.glob( - os.path.join(file_path, "*.{0}".format(ext))): + for yaml_file in glob.glob(os.path.join(file_path, + "*.{0}".format(ext) + )): if os.path.exists(yaml_file): with open(yaml_file, 'r') as q_file: questions_list = q_file.read() |