Skip to content

Commit

Permalink
fix RE for parsing mysite (allow - and _)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsoderblom committed Jul 19, 2021
1 parent a9f2faa commit f4f6473
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ssssh.py
Expand Up @@ -147,7 +147,7 @@ def readrc(rc_file):
print("ERROR: No valid token found in \"%s\". Have you logged in?" % rc_file)
sys.exit()
if "mysite" in line:
server = re.sub('mysite:([a-zA-Z0-9.]+)\n$', r'\1', line)
server = re.sub('mysite:([-a-zA-Z0-9_.]+)\n$', r'\1', line)
if server == 'none':
print("ERROR: No valid server specified in \"%s\". Have you logged in?" % rc_file)
sys.exit()
Expand Down

0 comments on commit f4f6473

Please sign in to comment.