From: Ralf Jung Date: Thu, 31 Oct 2013 08:40:25 +0000 (+0100) Subject: Use TLS for SpaceAPI updates X-Git-Url: https://git.ralfj.de/saartuer.git/commitdiff_plain/2300f481098a5d326b4a035fe18611a31b872666 Use TLS for SpaceAPI updates --- diff --git a/spaceapi.py b/spaceapi.py index 89e3678..dd722b9 100644 --- a/spaceapi.py +++ b/spaceapi.py @@ -20,7 +20,7 @@ class SpaceApi: state_val = 1 if state else 0 try: logger.info("Setting SpaceAPI to %d" % state_val) - url = "http://spaceapi.hacksaar.de/status.php?action=update&key=%s&status=%d" % (spaceApiKey, state_val) + url = "https://spaceapi.hacksaar.de/status.php?action=update&key=%s&status=%d" % (spaceApiKey, state_val) response = urllib.request.urlopen(url, timeout=5.0) responseText = response.read().decode('utf-8').strip() if response.getcode() == 200 and responseText == "UpdateSuccessful": return True