From 5d01db8514f9b06d2e478c0d86ffafe137093d5b Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 15 Nov 2019 13:59:09 +0000 Subject: move all datetime-related code from utils/__init__ to utils.datetime --- modules/git_webhooks/github.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/git_webhooks') diff --git a/modules/git_webhooks/github.py b/modules/git_webhooks/github.py index a95be555..cdf9016d 100644 --- a/modules/git_webhooks/github.py +++ b/modules/git_webhooks/github.py @@ -178,7 +178,7 @@ class GitHub(object): return url def _iso8601(self, s): - return datetime.datetime.strptime(s, utils.ISO8601_PARSE) + return utils.datetime.iso8601_parse(s) def ping(self, data): return ["Received new webhook"] @@ -415,7 +415,7 @@ class GitHub(object): completed_at = self._iso8601(data["check_run"]["completed_at"]) if completed_at > started_at: seconds = (completed_at-started_at).total_seconds() - duration = " in %s" % utils.to_pretty_time(seconds) + duration = " in %s" % utils.datetime.to_pretty_time(seconds) status = data["check_run"]["status"] status_str = "" -- cgit v1.3.1-10-gc9f91