about summary refs log tree commit diff
path: root/cli/broadlink_discovery
diff options
context:
space:
mode:
authorAnilDaoud <anil@via.ecp.fr>2019-05-22T05·28+0800
committerDaniel Høyer Iversen <mail@dahoiv.net>2019-05-22T05·28+0200
commitef66997953cb2beb05e05b81096b04a79d0f59ec (patch)
treea8fd9ddb812660fa1b269859465b9f47fcd29d25 /cli/broadlink_discovery
parentb8fdf337c9a60d74437bf88fa07134e651f7c0fa (diff)
2to3 broadlink_discovery (#245)
Diffstat (limited to 'cli/broadlink_discovery')
-rwxr-xr-xcli/broadlink_discovery18
1 files changed, 9 insertions, 9 deletions
diff --git a/cli/broadlink_discovery b/cli/broadlink_discovery
index 385f1932467f..2bb8d998d93f 100755
--- a/cli/broadlink_discovery
+++ b/cli/broadlink_discovery
@@ -8,17 +8,17 @@ parser = argparse.ArgumentParser(fromfile_prefix_chars='@');
 parser.add_argument("--timeout", type=int, default=5, help="timeout to wait for receiving discovery responses")
 args = parser.parse_args()
 
-print "Discovering..."
+print("Discovering...")
 devices = broadlink.discover(timeout=args.timeout)
 for device in devices:
     if device.auth():
-        print "###########################################"
-        print device.type
-        print "# broadlink_cli --type {} --host {} --mac {}".format(hex(device.devtype), device.host[0], ''.join(format(x, '02x') for x in device.mac))
-        print "Device file data (to be used with --device @filename in broadlink_cli) : "
-        print "{} {} {}".format(hex(device.devtype), device.host[0], ''.join(format(x, '02x') for x in device.mac))
+        print("###########################################")
+        print(device.type)
+        print("# broadlink_cli --type {} --host {} --mac {}".format(hex(device.devtype), device.host[0], ''.join(format(x, '02x') for x in device.mac)))
+        print("Device file data (to be used with --device @filename in broadlink_cli) : ")
+        print("{} {} {}".format(hex(device.devtype), device.host[0], ''.join(format(x, '02x') for x in device.mac)))
         if hasattr(device, 'check_temperature'):
-            print "temperature = {}".format(device.check_temperature())
-        print ""
+            print("temperature = {}".format(device.check_temperature()))
+        print("")
     else:
-        print "Error authenticating with device : {}".format(device.host)
+        print("Error authenticating with device : {}".format(device.host))