From 8db5a6b694f5e76c6192ff8c4232468e8d855e21 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Wed, 18 Jan 2012 13:00:57 -0600 Subject: [PATCH] update pretty_text to use a default label hg-commit-id: 9fefdb092622 --- extras/pretty_text.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extras/pretty_text.py b/extras/pretty_text.py index 6d0cb61d..9e669aca 100644 --- a/extras/pretty_text.py +++ b/extras/pretty_text.py @@ -8,7 +8,10 @@ def main(): 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]