Skip to content

Commit

Permalink
fix cleaning previous setup
Browse files Browse the repository at this point in the history
  • Loading branch information
unixfox committed Nov 14, 2023
1 parent 627daef commit 504beaf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions smart-ipv6-rotator.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def run(self):
mask=ipv6_network.prefixlen,
)
except Exception as e:
self.clean_previous_setup(memory_settings)
self.clean_previous_setup(memory_settings, args)
sys.exit(
"[Error] Failed to add the new random IPv6 address. The setup did not work!\n"
" That's unexpected! Did you correctly configured the IPv6 subnet to use?\n"
Expand All @@ -236,7 +236,7 @@ def run(self):
priority=1,
)
except Exception as e:
self.clean_previous_setup(memory_settings)
self.clean_previous_setup(memory_settings, args)
sys.exit(
"[Error] Failed to configure the test IPv6 route. The setup did not work!\n"
f" Exception:\n{e}"
Expand All @@ -253,14 +253,14 @@ def run(self):
if response_new_ipv6_address == random_ipv6_address:
print("[INFO] Correctly using the new random IPv6 address, continuing.")
else:
self.clean_previous_setup(memory_settings)
self.clean_previous_setup(memory_settings, args)
sys.exit(
"[ERROR] The new random IPv6 is not used! The setup did not work!\n"
" That is very unexpected, check if your IPv6 routes do not have too much priority."
f" Address used: {response_new_ipv6_address}"
)
except requests.exceptions.RequestException as e:
self.clean_previous_setup(memory_settings)
self.clean_previous_setup(memory_settings, args)
sys.exit(
"[ERROR] Failed to send the request for checking the new IPv6 address! The setup did not work!\n"
" Your provider probably does not allow setting any arbitrary IPv6 address.\n"
Expand All @@ -280,7 +280,7 @@ def run(self):
priority=1,
)
except Exception as e:
self.clean_previous_setup(memory_settings)
self.clean_previous_setup(memory_settings, args)
sys.exit(
f"[Error] Failed to configure the test IPv6 route. The setup did not work!\n"
f" Exception:\n{e}"
Expand Down

0 comments on commit 504beaf

Please sign in to comment.