-
Notifications
You must be signed in to change notification settings - Fork 215
Open
Description
This is because unlike priority which is converted to an int
priority = int(priority)
causing
if not expire or expire > 86400:
TypeError: '>' not supported between instances of 'str' and 'int'
retry and expiry aren't. This fixes it (wrapping all int comparisons and the final data set in int(..)
if not retry or int(retry) < 30:
logging.getLogger(__name__).error(
'retry is less than 30 or is not set, '
'setting retry to 30 to comply with '
'pushover API requirements')
data['retry'] = 30
else:
data['retry'] = int(retry)
# Expire can not be more than 86400 (24 hours)
if not expire or int(expire) > 86400:
logging.getLogger(__name__).error(
'expire is greater than 86400 seconds or is not set,'
'setting expire to 86400 to comply with'
'pushover API requirements')
data['expire'] = 86400
elif int(expire) <= 86400:
data['expire'] = int(expire)
Metadata
Metadata
Assignees
Labels
No labels