Browse Source

Remove sys from exit.

Joe Clarke 2 years ago
parent
commit
d400085e2e
1 changed files with 4 additions and 4 deletions
  1. 4 4
      setup-meraki-nets.py

+ 4 - 4
setup-meraki-nets.py

@@ -52,7 +52,7 @@ def main():
 
     if not os.path.isfile(args.config):
         print("Config file {} does not exist or is not a file!".format(args.config))
-        sys.exit(1)
+        exit(1)
 
     print(BANNER.format("Loading config file"))
     with open(args.config, "r") as c:
@@ -62,7 +62,7 @@ def main():
     for key in ["api_key", "organization", "networks"]:
         if key not in config:
             print("Invalid config: {} is missing!".format(key))
-            sys.exit(1)
+            exit(1)
 
     meraki = Meraki(key=config["api_key"])
     orgs = meraki.get_organizations()
@@ -74,7 +74,7 @@ def main():
 
     if org is None:
         print("Failed to find organization {} in this profile!".format(config["organization"]))
-        sys.exit(1)
+        exit(1)
 
     nets = org.get_networks()
     inv = org.get_inventory()
@@ -376,7 +376,7 @@ def main():
                 Fore.RED, Style.RESET_ALL
             )
         )
-        sys.exit(1)
+        exit(1)
 
 
 if __name__ == "__main__":