summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2018-10-07 00:17:52 +0200
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2018-10-07 01:55:34 +0200
commit42076466e00aa066769050bb2e2b4d98e9cc4d20 (patch)
tree86f46072b741c773e59fcfbcf350370f183d8c14
parentf871a904201eaf645faa159ead720975818f0a69 (diff)
test_task: store params in OrderedDict for Python≤3.5
-rwxr-xr-xkpov_judge/test_task.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/kpov_judge/test_task.py b/kpov_judge/test_task.py
index b96e63c..bc76d97 100755
--- a/kpov_judge/test_task.py
+++ b/kpov_judge/test_task.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
+import collections
import getpass
import io
import yaml
@@ -95,9 +96,9 @@ def locate_task(params, argparser, quiet=False):
if not quiet:
params = get_params(params, url_meta)
# then the student's ID (and password if neccessarry)
- fetch_params_meta = {
+ fetch_params_meta = collections.OrderedDict({
'username': {'descriptions': {'si': 'Uporabniško ime', 'en': 'Username'}},
- }
+ })
if params['task_url'] is not None and (
params['task_url'].startswith('http')):
fetch_params_meta['password'] = {'descriptions': {'si': 'Geslo', 'en': 'Password'}, }