changeset 8065:0bbf505c804f

lib: mktime needs a tuple - not a list Py3 is more strict.
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 22 Dec 2019 21:43:54 +0100
parents 8fb1b9e7106a
children d9d03f138cc3
files kallithea/lib/celerylib/tasks.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/celerylib/tasks.py	Mon Dec 23 02:59:05 2019 +0100
+++ b/kallithea/lib/celerylib/tasks.py	Sun Dec 22 21:43:54 2019 +0100
@@ -123,7 +123,6 @@
             co_day_auth_aggr = json.loads(cur_stats.commit_activity)
 
         log.debug('starting parsing %s', parse_limit)
-        lmktime = mktime
 
         last_rev = last_rev + 1 if last_rev >= 0 else 0
         log.debug('Getting revisions from %s to %s',
@@ -132,8 +131,8 @@
         for cs in repo[last_rev:last_rev + parse_limit]:
             log.debug('parsing %s', cs)
             last_cs = cs  # remember last parsed changeset
-            k = lmktime([cs.date.timetuple()[0], cs.date.timetuple()[1],
-                          cs.date.timetuple()[2], 0, 0, 0, 0, 0, 0])
+            tt = cs.date.timetuple()
+            k = mktime(tt[:3] + (0, 0, 0, 0, 0, 0))
 
             if akc(cs.author) in co_day_auth_aggr:
                 try: