Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix issue with locale.nl_langinfo() not being available on Windows.

  • Loading branch information...
commit 737c59b2c68e8c3a5aafc3d79cb97bb2e09710fe 1 parent 615896d
@mrjbq7 authored
Showing with 3 additions and 11 deletions.
  1. +3 −11 tracstats/web_ui.py
View
14 tracstats/web_ui.py
@@ -723,18 +723,10 @@ def _process_code(self, req, cursor, where, data):
'y': y,})
data['byhour'] = stats
- days = dict((day, i) for i, day in
- enumerate((locale.nl_langinfo(locale.ABDAY_1),
- locale.nl_langinfo(locale.ABDAY_2),
- locale.nl_langinfo(locale.ABDAY_3),
- locale.nl_langinfo(locale.ABDAY_4),
- locale.nl_langinfo(locale.ABDAY_5),
- locale.nl_langinfo(locale.ABDAY_6),
- locale.nl_langinfo(locale.ABDAY_7))))
- d = dict((i, 0) for i in range(7))
+ d = dict((str(i), 0) for i in range(7))
for rev, t, author, _, _ in revisions:
- day = time.strftime('%a', time.localtime(t))
- d[days[day]] += 1
+ day = time.strftime('%w', time.localtime(t))
+ d[day] += 1
stats = []
for x, y in sorted(d.iteritems()):
stats.append({'x': x,
Please sign in to comment.
Something went wrong with that request. Please try again.