From cc272879516653ef6a2d77bfdd2ccd6f5031e5e4 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 9 Oct 2017 16:10:01 +0200 Subject: [PATCH] bintray.py: fix the argument check --- support/bintray.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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') -- 2.47.3