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 4ec8cf4 commit 1cac4edCopy full SHA for 1cac4ed
mftp/mftp.py
@@ -52,14 +52,21 @@
52
)
53
54
print("[ERP LOGIN]", flush=True)
55
- _, ssoToken = erp.login(
56
- headers,
57
- session,
58
- ERPCREDS=env,
59
- OTP_CHECK_INTERVAL=2,
60
- LOGGING=True,
61
- SESSION_STORAGE_FILE=".session",
62
- )
+ try:
+ _, ssoToken = erp.login(
+ headers,
+ session,
+ ERPCREDS=env,
+ OTP_CHECK_INTERVAL=2,
+ LOGGING=True,
+ SESSION_STORAGE_FILE=".session",
63
+ )
64
+ except erp.ErpLoginError as e:
65
+ print(f"[ERP LOGIN FAILED] {e}", flush=True)
66
+ if args.cron:
67
+ break
68
+ print("[RETRYING]", flush=True)
69
+ continue
70
71
if env.COMPANY_NOTIFIER:
72
if args.gmail_api or args.smtp:
0 commit comments