aboutsummaryrefslogtreecommitdiffstats
path: root/pushover.py
diff options
context:
space:
mode:
authorCrupuk <sebastien.andreatta@gmail.com>2013-08-26 16:03:10 +0200
committerCrupuk <sebastien.andreatta@gmail.com>2013-08-26 16:03:10 +0200
commitc69b2b79b81a12f3d15b6f557d63384ff23f6433 (patch)
tree0ff7701474f4d2ed63606263a25a67b0a3fecd89 /pushover.py
parenta5e3f13ed4e49755ee0b9895dc0ba29584eb27f4 (diff)
downloadpython-pushover-c69b2b79b81a12f3d15b6f557d63384ff23f6433.tar.gz
Update condition for timestamp
We need to test boolean only : >>> key="timestamp" >>> value="123456" >>> >>> if key == "timestamp" and value: ... print "Value <> True but, still true" ... else: ... print "value <> True and false" ... Value <> True but, still true
Diffstat (limited to 'pushover.py')
-rw-r--r--pushover.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pushover.py b/pushover.py
index f6f8e98..0e3f4e6 100644
--- a/pushover.py
+++ b/pushover.py
@@ -192,7 +192,7 @@ class Client:
if key not in valid_keywords:
raise ValueError("{0}: invalid message parameter".format(key))
- if key == "timestamp" and value:
+ if key == "timestamp" and value == True:
payload[key] = int(time.time())
elif key == "sound":
if not SOUNDS: