|
@@ -153,29 +153,23 @@ def run_file(files, parameters, expected, mode):
|
|
|
# Modelverse has already terminated, which isn't a good sign!
|
|
|
return False
|
|
|
|
|
|
- val = urllib2.urlopen(urllib2.Request(address, urllib.urlencode({"op": "get_output", "username": username})), timeout=10).read()
|
|
|
- #TODO if there is a value here, we have to store it for later use!
|
|
|
- l, r = val.split("&", 1)
|
|
|
- if l.startswith("id"):
|
|
|
- id_str = l
|
|
|
- val_str = r
|
|
|
- else:
|
|
|
- id_str = r
|
|
|
- val_str = l
|
|
|
- id_val = id_str.split("=", 1)[1]
|
|
|
- val_val = val_str.split("=", 1)[1]
|
|
|
- #TODO this doesn't work!!! we expect it to be filled in, which it isn't!
|
|
|
-
|
|
|
- if val_val == "None":
|
|
|
- print("Value is for us: keeping")
|
|
|
- print(id_val)
|
|
|
- print(val_val)
|
|
|
- var_list[p] = id_val
|
|
|
- else:
|
|
|
- print("Value not for us: skip")
|
|
|
- print(id_val)
|
|
|
- print(val_val)
|
|
|
- got_output.append(val)
|
|
|
+ while 1:
|
|
|
+ val = urllib2.urlopen(urllib2.Request(address, urllib.urlencode({"op": "get_output", "username": username})), timeout=10).read()
|
|
|
+ l, r = val.split("&", 1)
|
|
|
+ if l.startswith("id"):
|
|
|
+ id_str = l
|
|
|
+ val_str = r
|
|
|
+ else:
|
|
|
+ id_str = r
|
|
|
+ val_str = l
|
|
|
+ id_val = id_str.split("=", 1)[1]
|
|
|
+ val_val = val_str.split("=", 1)[1]
|
|
|
+
|
|
|
+ if val_val == "None":
|
|
|
+ var_list[p] = id_val
|
|
|
+ break
|
|
|
+ else:
|
|
|
+ got_output.append(val)
|
|
|
continue
|
|
|
else:
|
|
|
val = var_list[p]
|