Ver Fonte

products util: fix issue with help output

Jason Rumney há 1 ano atrás
pai
commit
38404fb6de
1 ficheiros alterados com 3 adições e 4 exclusões
  1. 3 4
      util/products.py

+ 3 - 4
util/products.py

@@ -2,8 +2,6 @@
 
 
 import sys
 import sys
 
 
-from common_funcs import load_config
-
 from custom_components.tuya_local.helpers.device_config import (
 from custom_components.tuya_local.helpers.device_config import (
     available_configs,
     available_configs,
     TuyaDeviceConfig,
     TuyaDeviceConfig,
@@ -22,9 +20,10 @@ def main():
         elif arg == "--nameonly":
         elif arg == "--nameonly":
             nameonly = True
             nameonly = True
         else:
         else:
-            printf("List potential issues with products listings")
-            printf("")
+            print("List potential issues with products listings")
+            print("")
             print(f"Usage: {sys.argv[0]} [--missing] [--nameonly]")
             print(f"Usage: {sys.argv[0]} [--missing] [--nameonly]")
+            exit(1)
 
 
     # default to nameonly if no arguments supplied
     # default to nameonly if no arguments supplied
     if not arg_supplied:
     if not arg_supplied: