about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xtracer.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tracer.py b/tracer.py
index 5cdb30b..7f08f09 100755
--- a/tracer.py
+++ b/tracer.py
@@ -7,6 +7,7 @@ import sys, os
 import time
 import subprocess
 import tracery
+import traceback
 from tracery.modifiers import base_english
 import json
 import random
@@ -66,8 +67,8 @@ def listify(col):
 
 
 def shuffle(col):
-    a = random.choice(col.keys())
-    b = random.choice(col.keys())
+    a = random.choice(list(col))
+    b = random.choice(list(col))
     if "origin" in [a, b]:
         print("origin discard")
         return col
@@ -179,3 +180,4 @@ if __name__ == "__main__":
                 except Exception as e:
                     print("ERROR" + str(m))
                     print(e)
+                    traceback.print_exc()