aboutsummaryrefslogtreecommitdiff
path: root/autopeer_shell.py
diff options
context:
space:
mode:
authorGravatar steering72532026-04-08 16:36:59 +0000
committerGravatar steering72532026-04-08 16:36:59 +0000
commitbca037330893403ee20e8d6381db9b375c137c19 (patch)
tree835cb4262c48f012a2bf15691400736134094855 /autopeer_shell.py
parentshorten wg name (diff)
misc fixes
Diffstat (limited to 'autopeer_shell.py')
-rwxr-xr-xautopeer_shell.py6
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')