]> git.armaanb.net Git - lightcards.git/blobdiff - lightcards/lightcards.py
Clean up pickle implementation
[lightcards.git] / lightcards / lightcards.py
index ecd18d2cb40043c197758fb42a4c7dd0501eba33..768ac6852a14eb9d18a9c2960125db0ced324b2f 100644 (file)
@@ -25,6 +25,7 @@ def parse_args():
     parser.add_argument("-p", "--purge",
                         action='store_true',
                         help="don't check cached info before starting")
+    # TODO: don't require input file when using  -P
     parser.add_argument("-P", "--purge-all",
                         action='store_true',
                         help="don't check cached info before starting")
@@ -52,20 +53,12 @@ def show(args, stack, headers):
         progress.purge_all()
 
     # Check for caches
-    ida = progress.dive("status", stack)
+    ida = progress.dive(stack)
     if ida:
-        idx = ida
+        (idx, stack, headers) = ida
     else:
         idx = Status()
 
-    stackb = progress.dive("stack", stack)
-    if stackb:
-        stack = stackb
-
-    headerb = progress.dive("headers", stack)
-    if headerb:
-        headers = headerb
-
     # Manipulate deck
     if args.flip:
         for x in stack: