1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +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,
help="Password")
(options, args) = parser.parse_args()
if not args:
parser.print_help()
sys.exit(0)
if len(args) != 1:
parser.error("incorrect number of arguments")

Binary file not shown.