Skip to content
Permalink
Browse files
Allow for additional ignored args
  • Loading branch information
sebbASF committed Dec 11, 2019
1 parent 2ab19d8 commit 796d0133596c57c5bef5bd1acfdde08860be65b5
Showing 1 changed file with 4 additions and 4 deletions.
8 otp.py
@@ -139,12 +139,12 @@ def main():
parsed = parser.parse_args()

parts = parsed.args
if len(parts) != 3:
if len(parts) < 3: # we don't have enough args, prompt
line = input('Challenge? ')
parts = line.split()
if len(parts) < 3:
print('ERROR: challenge must have: ALGO SEQUENCE SEED')
sys.exit(1)
if len(parts) < 3: # still not enough
print('ERROR: challenge must have: ALGO SEQUENCE SEED ...')
sys.exit(1)

algo = parts[0]
seq = int(parts[1])

0 comments on commit 796d013

Please sign in to comment.