From: Jaroslav Kysela Date: Mon, 9 Oct 2017 14:10:01 +0000 (+0200) Subject: bintray.py: fix the argument check X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cc272879516653ef6a2d77bfdd2ccd6f5031e5e4;p=thirdparty%2Ftvheadend.git bintray.py: fix the argument check --- diff --git a/support/bintray.py b/support/bintray.py index c30023959..56db6ad7d 100755 --- a/support/bintray.py +++ b/support/bintray.py @@ -351,11 +351,11 @@ def test_filename(): def main(argv): global DEBUG - if argv[1] == '--test-filename': + if len(argv) > 1 and argv[1] == '--test-filename': return test_filename() if not BINTRAY_USER or not BINTRAY_PASS: error(2, 'No credentals') - if argv[1] == '--debug': + if len(argv) > 1 and argv[1] == '--debug': DEBUG=1 argv.pop(0) cmd = 'do_' + (len(argv) > 1 and argv[1] or 'unknown')