From db862d1d96e9800464e415e019bd3b41a9443a47 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 19 Jan 2020 15:39:57 +0100 Subject: [PATCH] Datetime conversion should also support cases where the input is a float timestamp represented as a string --- platypush/backend/travisci.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platypush/backend/travisci.py b/platypush/backend/travisci.py index 8000c29d2d..4b134d4b76 100644 --- a/platypush/backend/travisci.py +++ b/platypush/backend/travisci.py @@ -38,8 +38,10 @@ class TravisciBackend(Backend): if not d: return - if isinstance(d, int) or isinstance(d, float): - return d + try: + return float(d) + except ValueError: + pass if isinstance(d, str): if d.endswith('Z'):