# HG changeset patch # User Mads Kiilerich # Date 2019-12-22 21:43:54 # Node ID 0bbf505c804f1dee8ac17d4a0bd7629968317022 # Parent 8fb1b9e7106a6bd04d249240138c003d3b2e2c33 lib: mktime needs a tuple - not a list Py3 is more strict. diff --git a/kallithea/lib/celerylib/tasks.py b/kallithea/lib/celerylib/tasks.py --- a/kallithea/lib/celerylib/tasks.py +++ b/kallithea/lib/celerylib/tasks.py @@ -123,7 +123,6 @@ def get_commits_stats(repo_name, ts_min_ 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 @@ def get_commits_stats(repo_name, ts_min_ 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: