From ac841eda31e2a485a9bb9993d2658661b83e5f25 Mon Sep 17 00:00:00 2001 From: hsiao yi Date: Tue, 14 Aug 2018 21:20:20 -0400 Subject: [PATCH] don't need items() when iterating over keys --- filebrowser/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/filebrowser/views.py b/filebrowser/views.py index 69aac3f..8da5943 100755 --- a/filebrowser/views.py +++ b/filebrowser/views.py @@ -41,7 +41,7 @@ filter_re = [] for exp in EXCLUDE: filter_re.append(re.compile(exp)) -for k, v in VERSIONS.items(): +for k in VERSIONS: exp = r'_{0}({1})'.format(k, '|'.join(EXTENSION_LIST)) filter_re.append(re.compile(exp)) @@ -93,7 +93,7 @@ def browse(request): results_var = {'results_total': 0, 'results_current': 0, 'delete_total': 0, 'images_total': 0, 'select_total': 0} counter = {} - for k, v in EXTENSIONS.items(): + for k in EXTENSIONS: counter[k] = 0 dir_list = os.listdir(abs_path)