Skip to content

Commit

Permalink
CLI prints help when no arguments are given to djboss.
Browse files Browse the repository at this point in the history
  • Loading branch information
glenrobertson committed Jan 24, 2012
1 parent 177ca7e commit 492de03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/djboss/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ def main():
PARSER.set_defaults(log_level='DEBUG')
else:
PARSER.set_defaults(log_level='WARN')

if len(sys.argv) == 1:
PARSER.print_help()
sys.exit(1)

args = PARSER.parse_args()
logging.root.setLevel(getattr(logging, args.log_level))
Expand Down

0 comments on commit 492de03

Please sign in to comment.