From c69b2b79b81a12f3d15b6f557d63384ff23f6433 Mon Sep 17 00:00:00 2001 From: Crupuk Date: Mon, 26 Aug 2013 16:03:10 +0200 Subject: 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 --- pushover.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- cgit v1.2.3-70-g09d2