projects
/
saartuer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0889e9a
)
Use TLS for SpaceAPI updates
author
Ralf Jung
<post@ralfj.de>
Thu, 31 Oct 2013 08:40:25 +0000
(09:40 +0100)
committer
Ralf Jung
<post@ralfj.de>
Thu, 31 Oct 2013 08:40:25 +0000
(09:40 +0100)
spaceapi.py
patch
|
blob
|
history
diff --git
a/spaceapi.py
b/spaceapi.py
index 89e3678290e652773306d697aa642a364b2c1e55..dd722b972ffb52bc8ee9af0d1184f87fc387b54c 100644
(file)
--- 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)
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 = "http
s
://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
response = urllib.request.urlopen(url, timeout=5.0)
responseText = response.read().decode('utf-8').strip()
if response.getcode() == 200 and responseText == "UpdateSuccessful": return True