Skip to content
Browse files

Allow no options or args and just print usage. Return project so it's…

… available with python -i refine.py
  • Loading branch information...
1 parent dfcf5e8 commit 0883216e0f15116a8f427ce2a711c510e6f31ed9 @PaulMakepeace PaulMakepeace committed
Showing with 5 additions and 3 deletions.
  1. +5 −3 refine.py
View
8 refine.py
@@ -83,10 +83,10 @@ def main():
refine.REFINE_PORT = options.port
if not options.list and len(args) != 1:
- PARSER.error('expecting --list or project ID/URL')
+ PARSER.print_usage()
if options.list:
list_projects()
- else:
+ if args:
project = refine.RefineProject(args[0])
if options.apply:
response = project.apply_operations(options.apply)
@@ -96,6 +96,8 @@ def main():
if options.export:
export_project(project, options)
+ return project
if __name__ == '__main__':
- main()
+ # return project so that it's available interactively, python -i refine.py
+ project = main()

0 comments on commit 0883216

Please sign in to comment.
Something went wrong with that request. Please try again.