Browse Source

Re-order.

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

+ 5 - 5
setup-meraki-nets.py

@@ -118,6 +118,11 @@ def main():
                         break
             net_obj = org.create_network(nname, **nargs)
 
+        if net_obj is None:
+            print("{}Error creating new network {}!{}".format(Fore.RED, nname, Style.RESET_ALL))
+            errors += 1
+            continue
+
         if "client_limit" in network:
             if not isinstance(network["client_limit"], int) or network["client_limit"] < 0:
                 print(
@@ -135,11 +140,6 @@ def main():
                 print("{}Error adding shaping to network {}!{}".format(Fore.RED, nname, Style.RESET_ALL))
                 nerrors += 1
 
-        if net_obj is None:
-            print("{}Error creating new network {}!{}".format(Fore.RED, nname, Style.RESET_ALL))
-            errors += 1
-            continue
-
         if "devices" in network:
             for serial, dev in network["devices"].items():
                 if "name" not in dev: