From 69d58eede2e9bf83aa1ed1d8fcf956efde494726 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 3 Oct 2018 13:22:37 +0100 Subject: Move src/Utils.py in to src/utils/, splitting functionality out in to modules of related functionality --- modules/tweets.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/tweets.py') diff --git a/modules/tweets.py b/modules/tweets.py index f0aedcc4..539506b9 100644 --- a/modules/tweets.py +++ b/modules/tweets.py @@ -5,7 +5,7 @@ import datetime, re, time, traceback import twitter -from src import ModuleManager, Utils +from src import ModuleManager, utils REGEX_TWITTERURL = re.compile( "https?://(?:www\.)?twitter.com/[^/]+/status/(\d+)", re.I) @@ -16,10 +16,10 @@ class Module(ModuleManager.BaseModule): def make_timestamp(self, s): seconds_since = time.time() - datetime.datetime.strptime(s, "%a %b %d %H:%M:%S %z %Y").timestamp() - since, unit = Utils.time_unit(seconds_since) + since, unit = utils.time_unit(seconds_since) return "%s %s ago" % (since, unit) - @Utils.hook("received.command.tweet|tw") + @utils.hook("received.command.tweet|tw") def tweet(self, event): """ :help: Get/find a tweet -- cgit v1.3.1-10-gc9f91