Print usage when argv empty

This commit is contained in:
Sam 2018-03-06 01:18:58 -05:00
parent 49e1bdfe3d
commit fab8c8ba1c
2 changed files with 8 additions and 0 deletions

View File

@ -95,6 +95,10 @@ def get_opts(args=None):
)
opts = parser.parse_args(args=args)
if len(sys.argv) < 2:
parser.print_help()
exit(0)
if not opts.prefix:
parser.error("Running with no --prefix will match nothing.")

View File

@ -269,6 +269,10 @@ def get_args(args=None):
help="Path to a file which contains a list of images to exclude, one "
"image tag per line.")
if len(sys.argv) < 2:
parser.print_help()
exit(0)
return parser.parse_args(args=args)