Browse Source

Fix bug in read

Yentl Van Tendeloo 8 years ago
parent
commit
55e5f28359
1 changed files with 4 additions and 3 deletions
  1. 4 3
      wrappers/modelverse.py

+ 4 - 3
wrappers/modelverse.py

@@ -723,12 +723,13 @@ def read(model_name, ID):
     _input(["read", ID])
     output = _handle_output("Success: ", split=" ")
     v = output.split("\n")
+    print(v)
     t = v[1].split(":")[1].strip()
-    if (not v[0].startswith("Source:")):
+    if (not v[2].startswith("Source:")):
         rval = (t, None)
     else:
-        src = v[0].split(":")[1].strip()
-        trg = v[1].split(":")[1].strip()
+        src = v[2].split(":")[1].strip()
+        trg = v[3].split(":")[1].strip()
         rval = (t, (src, trg))
     return rval