changeset 727:03b66f90916f

works
author Jeff Hammel <k0scist@gmail.com>
date Tue, 02 Dec 2014 13:59:37 -0800
parents 541560ed190f
children 6ba565f99696
files python/find_str_format.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/python/find_str_format.py	Tue Dec 02 13:57:02 2014 -0800
+++ b/python/find_str_format.py	Tue Dec 02 13:59:37 2014 -0800
@@ -18,13 +18,15 @@
         try:
             string.format(**{i:'' for i in retval})
             return retval
-        except KeyError:
-            import pdb; pdb.set_trace()
+        except KeyError as e:
+            retval.add(e.message)
+
 
 def main(args=sys.argv[1:]):
 
-    # parse command line
     string = ' '.join(args)
+    keys = find_keys(string)
+    print ('\n'.join(sorted(keys)))
 
 if __name__ == '__main__':
     main()