aboutsummaryrefslogtreecommitdiff
path: root/modules/ngrok.py
diff options
context:
space:
mode:
authorAarni Koskela <akx@iki.fi>2023-05-09 22:17:58 +0300
committerAarni Koskela <akx@iki.fi>2023-05-09 22:25:39 +0300
commit3ba6c3c83c0983a025c7bddc08bb7f49481b3cbb (patch)
tree77b2bea31c0e94ac67fddf86fdc7cba65a24af2c /modules/ngrok.py
parent8fb16ceb288a93f6ecaa45a0afcb3db718333e3e (diff)
Fix up string formatting/concatenation to f-strings where feasible
Diffstat (limited to 'modules/ngrok.py')
-rw-r--r--modules/ngrok.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/ngrok.py b/modules/ngrok.py
index 1ad7989b..7a7b4b26 100644
--- a/modules/ngrok.py
+++ b/modules/ngrok.py
@@ -7,8 +7,8 @@ def connect(token, port, region):
else:
if ':' in token:
# token = authtoken:username:password
- account = token.split(':')[1] + ':' + token.split(':')[-1]
- token = token.split(':')[0]
+ token, username, password = token.split(':', 2)
+ account = f"{username}:{password}"
config = conf.PyngrokConfig(
auth_token=token, region=region