From: Jaroslav Kysela Date: Mon, 9 Oct 2017 14:10:01 +0000 (+0200) Subject: bintray.py: fix the argument check X-Git-Tag: v4.2.7~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e780342ebd1a731292289e972c4c92ba7363ccd;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')