summaryrefslogtreecommitdiff
path: root/autopeer_shell.py
diff options
context:
space:
mode:
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')