diff options
| author | 2026-04-08 16:36:59 +0000 | |
|---|---|---|
| committer | 2026-04-08 16:36:59 +0000 | |
| commit | bca037330893403ee20e8d6381db9b375c137c19 (patch) | |
| tree | 835cb4262c48f012a2bf15691400736134094855 /autopeer_shell.py | |
| parent | shorten wg name (diff) | |
misc fixes
Diffstat (limited to 'autopeer_shell.py')
| -rwxr-xr-x | autopeer_shell.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/autopeer_shell.py b/autopeer_shell.py index d981676..6b31ecb 100755 --- a/autopeer_shell.py +++ b/autopeer_shell.py @@ -29,9 +29,11 @@ def as_from_user(which=None): else: print(f"oops, something went wrong getting your ASes, specifically: {filename}", file=sys.stderr) - if which is None: + if MY_ASN in user_ases and which: # allow owner to operate as anyone + return which + elif which is None: # at startup, use the first found return user_ases[0] - elif which in user_ases: + elif which in user_ases: # if the user picked an AS in their list return which else: raise Exception('not yours') |
