From 6418697f0cfc895aae1a70bcd277ed99aef6f390 Mon Sep 17 00:00:00 2001 From: "j.c.sackett" Date: Wed, 15 Jul 2009 17:47:10 -0400 Subject: [PATCH] Cleaned up the weaver script. --- weaver.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/weaver.py b/weaver.py index 5f2db85..7ea27b8 100755 --- a/weaver.py +++ b/weaver.py @@ -18,8 +18,19 @@ def init(args): os.path.join(target_dir, 'settings.py') ) +def build(args): + pass + +commands = { + 'init':init, + 'build':build +} + if __name__ == '__main__': cmd = sys.argv[1] args = sys.argv[2:] - commands[cmd](args) \ No newline at end of file + try: + commands[cmd](args) + except KeyError: + print '%s is not a weaver command.' % cmd \ No newline at end of file