Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Commit 7eab2fd

Browse files
committed
simplify arg parsing
1 parent 3ba1569 commit 7eab2fd

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

paperspace/main.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,11 @@ def main():
2020
while args:
2121
opt = args.pop(0)
2222
if opt == '--email':
23-
if args:
24-
email = args.pop(0)
23+
email = args.pop(0) if args else None
2524
elif opt == '--password':
26-
if args:
27-
password = args.pop(0)
25+
password = args.pop(0) if args else None
2826
elif opt == '--apiToken':
29-
if args:
30-
apiToken = args.pop(0)
27+
apiToken = args.pop(0) if args else None
3128
elif not email:
3229
email = opt
3330
elif not password:

0 commit comments

Comments
 (0)