parse test_issuer args allow option "allow-overlap" to be optional
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 21 Nov 2021 21:12:14 +0000 (21:12 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 21 Nov 2021 21:12:14 +0000 (21:12 +0000)
src/soc/simple/test/test_issuer.py

index 4f5d2c6a0eebfe0e00fc1f3ec3358ca833c493df..b8245cbf1a5356f39a6695531ecda1e96460617b 100644 (file)
@@ -42,7 +42,7 @@ if __name__ == "__main__":
 
     # detect overlap case
     allow_overlap = False
-    if sys.argv[1] == '--allow-overlap':
+    if len(sys.argv) >= 2 and sys.argv[1] == '--allow-overlap':
         allow_overlap = True
         del sys.argv[1]