Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Maxime Bombar
18d0c52e03 if __name__ == '__main__' pour ne pas reflasher les switches dans un import 2019-07-29 18:09:00 +02:00

View file

@ -237,6 +237,10 @@ class Switch:
post_reboot = requests.post(url_reboot, data=json.dumps(data), headers=self.headers) post_reboot = requests.post(url_reboot, data=json.dumps(data), headers=self.headers)
if __name__=='__main__':
if "--force" in sys.argv: if "--force" in sys.argv:
sw = Switch() sw = Switch()
for switch in all_switchs: for switch in all_switchs: