We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb458c7 commit 8dbca06Copy full SHA for 8dbca06
cryosparc/cli.py
@@ -1,5 +1,6 @@
1
import hashlib
2
import os
3
+import re
4
import sys
5
from argparse import ArgumentParser, ArgumentTypeError, Namespace
6
from datetime import datetime, timedelta, timezone
@@ -61,6 +62,12 @@ def login(args: Namespace):
61
62
if not args.password:
63
args.password = getpass("Password: ")
64
65
+ if not args.url:
66
+ print("Error: CryoSPARC URL is required!", file=sys.stderr)
67
+ os._exit(1)
68
+ if not re.match(r"^https?://", args.url):
69
+ args.url = "http://" + args.url
70
+
71
sessions = InstanceAuthSessions.load()
72
73
expiration_date = (datetime.now() + timedelta(seconds=expires_in)).replace(microsecond=0)
0 commit comments