shithub: pokered

Download patch

ref: 8db5a6b694f5e76c6192ff8c4232468e8d855e21
parent: 38370d844d2285c320b267040bf1a9f64a4ca3f8
author: Bryan Bishop <kanzure@gmail.com>
date: Wed Jan 18 08:00:57 EST 2012

update pretty_text to use a default label

hg-commit-id: 9fefdb092622


--- a/extras/pretty_text.py
+++ b/extras/pretty_text.py
@@ -8,7 +8,10 @@
     usage = "usage: %prog address label"
     parser = OptionParser(usage)
     (options, args) = parser.parse_args()
-    if len(args) != 2:
+    if len(args) == 1:
+        print "usage: python pretty_text.py address label"
+        args.append("UnnamedText_" + (args[0].replace("0x", "")))
+    elif len(args) != 2:
         parser.error("we need both an address and a label")
     address = int(args[0], 16)
     label = args[1]