# HG changeset patch # User Jeff Hammel # Date 1376175142 25200 # Node ID f39d37973d4b1c02c992d11f5f2f69732b0cd6e0 # Parent 056befdec66cd7f17ffa299d0ac45d6a5b3bee08 python/setup_repo.py diff -r 056befdec66c -r f39d37973d4b python/setup_repo.py --- a/python/setup_repo.py Sat Aug 10 15:19:39 2013 -0700 +++ b/python/setup_repo.py Sat Aug 10 15:52:22 2013 -0700 @@ -82,14 +82,18 @@ help="setup remote server only") options, args = parser.parse_args(args) + # sanitization + if not args: + args = [os.getcwd()] + if len(args) != 1: + parser.print_usage() + parser.exit() + directory = args[0] + # initialize repository if options.remote_only: assert options.remote_url else: - if len(args) != 1: - parser.print_usage() - parser.exit() - directory = args[0] init_repo(directory) # setup remote, if specified