1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

Print help text when called without arguments

This commit is contained in:
Olof Johansson 2013-07-25 21:01:57 +02:00
parent 455fbf3fd1
commit 3cfbd6b679
2 changed files with 3 additions and 0 deletions

View File

@ -120,6 +120,9 @@ def main():
parser.add_option("-p", "--password", default=None, parser.add_option("-p", "--password", default=None,
help="Password") help="Password")
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
if not args:
parser.print_help()
sys.exit(0)
if len(args) != 1: if len(args) != 1:
parser.error("incorrect number of arguments") parser.error("incorrect number of arguments")

Binary file not shown.