]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
bintray.py: fix the argument check
authorJaroslav Kysela <perex@perex.cz>
Mon, 9 Oct 2017 14:10:01 +0000 (16:10 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 20 Sep 2018 14:01:36 +0000 (16:01 +0200)
support/bintray.py

index c300239591b4472e4ef258f6e2b7135576401bd2..56db6ad7d287356ae4af024d3aa02e4b61c1ad6e 100755 (executable)
@@ -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')