From 081280d46d3488115105f1ac5cdb7279e28bd55f Mon Sep 17 00:00:00 2001 From: softScheck GmbH Date: Thu, 7 May 2020 12:59:45 +0200 Subject: [PATCH] Bump version to 0.3, python3 support --- tplink_smartplug.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tplink_smartplug.py b/tplink_smartplug.py index 981531f..9f5c0a1 100755 --- a/tplink_smartplug.py +++ b/tplink_smartplug.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # # TP-Link Wi-Fi Smart Plug Protocol Client # For use with TP-Link HS-100 or HS-110 @@ -24,7 +24,7 @@ import socket import argparse from struct import pack -version = 0.2 +version = 0.3 # Check if hostname is valid def validHostname(hostname): @@ -139,10 +139,10 @@ try: decrypted = decrypt(data[4:]) if args.quiet: - print decrypted + print(decrypted) else: - print "Sent: ", cmd - print "Received: ", decrypted + print("Sent: ", cmd) + print("Received: ", decrypted) except socket.error: quit("Cound not connect to host " + ip + ":" + str(port))