if __name__ == '__main__' pour ne pas reflasher les switches dans un import
This commit is contained in:
parent
58eb2bad62
commit
18d0c52e03
1 changed files with 27 additions and 23 deletions
4
main.py
4
main.py
|
@ -237,6 +237,10 @@ class Switch:
|
|||
post_reboot = requests.post(url_reboot, data=json.dumps(data), headers=self.headers)
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__=='__main__':
|
||||
|
||||
if "--force" in sys.argv:
|
||||
sw = Switch()
|
||||
for switch in all_switchs:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue