diff options
author | Tommi Virtanen <tv@eagain.net> | 2007-09-03 17:06:49 -0700 |
---|---|---|
committer | Tommi Virtanen <tv@eagain.net> | 2007-09-03 17:09:19 -0700 |
commit | 82f5857759e0262e43ec11f4319395b6a373872d (patch) | |
tree | 75702d7fa3041d092754728637c32bdc6db166cc /gitosis/serve.py | |
parent | Refactor command line utilities to share setup. (diff) | |
download | gitosis-dakkar-82f5857759e0262e43ec11f4319395b6a373872d.tar.gz gitosis-dakkar-82f5857759e0262e43ec11f4319395b6a373872d.tar.bz2 gitosis-dakkar-82f5857759e0262e43ec11f4319395b6a373872d.zip |
Make gitosis-serve not fail with commands without arguments.
Diffstat (limited to 'gitosis/serve.py')
-rw-r--r-- | gitosis/serve.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gitosis/serve.py b/gitosis/serve.py index 4b7c6a7..551ac46 100644 --- a/gitosis/serve.py +++ b/gitosis/serve.py @@ -54,7 +54,11 @@ def serve( if '\n' in command: raise CommandMayNotContainNewlineError() - verb, args = command.split(None, 1) + try: + verb, args = command.split(None, 1) + except ValueError: + # all known commands take one argument; improve if/when needed + raise UnknownCommandError() if (verb not in COMMANDS_WRITE and verb not in COMMANDS_READONLY): |