Skip to content

Commit

Permalink
Enable display of source lines of code for all projects
Browse files Browse the repository at this point in the history
  • Loading branch information
flashcode committed Sep 22, 2024
1 parent 6c34329 commit ed52977
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions weechat/dev/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,12 @@ def stats_repo(request, stats='weechat'):
except: # noqa: E722 pylint: disable=bare-except
pass

if stats in ('weechat', 'weechat-relay', 'qweechat'):
try:
with open(files_path_join('stats', f'sloc_{stats}.txt'),
'r', encoding='utf-8') as _file:
sloc = _file.read()
except: # noqa: E722 pylint: disable=bare-except
pass
try:
with open(files_path_join('stats', f'sloc_{stats}.txt'),
'r', encoding='utf-8') as _file:
sloc = _file.read()
except: # noqa: E722 pylint: disable=bare-except
pass

if stats == 'weechat':
repository = 'https://github.com/weechat/weechat'
Expand All @@ -189,6 +188,7 @@ def stats_repo(request, stats='weechat'):
sloc_lang = 'Python'
elif stats == 'weechat.org':
repository = 'https://github.com/weechat/weechat.org'
sloc_lang = 'Python'
return render(
request,
'dev/stats.html',
Expand Down

0 comments on commit ed52977

Please sign in to comment.