]> scripts.mit.edu Git - wizard.git/commitdiff
Add README file and fix bug in wizard COMMAND --help
authorEdward Z. Yang <edwardzyang@thewritingpot.com>
Sun, 14 Jun 2009 03:51:05 +0000 (23:51 -0400)
committerEdward Z. Yang <edwardzyang@thewritingpot.com>
Sun, 14 Jun 2009 03:51:05 +0000 (23:51 -0400)
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
README [new file with mode: 0644]
bin/wizard

diff --git a/README b/README
new file mode 100644 (file)
index 0000000..4f95d69
--- /dev/null
+++ b/README
@@ -0,0 +1,9 @@
+To add a new command to wizard, you need to touch the following
+locations:
+
+- bin/wizard
+    Add a line describing your command in the helpstring
+- lib/wizard/command/__init__.py
+    Add the line "import commandname"
+- lib/wizard/command/commandname.py
+    Implement your command there as main()
index ac69d8ece66a42ea16dc1947dd1488755aa47567..1b7503556f489d1e0bdd300e8b9848f21866f43b 100755 (executable)
@@ -48,7 +48,7 @@ See '%prog help COMMAND' for more information on a specific command.
     if command == "help":
         try:
             getattr(wizard.command, rest_argv[0])(['-h'], options)
-        except KeyError:
+        except AttributeError:
             parser.error("invalid action")
         except IndexError:
             parser.print_usage()