mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
Fixed PEP8 standards and other specified changes
This commit is contained in:
parent
8d5ef42b73
commit
15a336613b
@ -72,13 +72,16 @@ def manual(request):
|
||||
{'title': _('{box_name} Manual').format(box_name=_(cfg.box_name)),
|
||||
'content': content})
|
||||
|
||||
|
||||
def status_logs(request):
|
||||
X = 100
|
||||
file = open(cfg.status_log_file,"r")
|
||||
data = file.readlines()
|
||||
data = "".join(data[-X:])
|
||||
""" Serves the last 100 lines of Status log"""
|
||||
nr_lines = 100
|
||||
logfile = open(cfg.status_log_file, "r")
|
||||
data = logfile.readlines()
|
||||
data = "".join(data[-nr_lines:])
|
||||
context = {
|
||||
"X":X,
|
||||
"data":data
|
||||
"nr_lines": nr_lines,
|
||||
"data": data
|
||||
}
|
||||
logfile.close()
|
||||
return TemplateResponse(request, "statuslog.html", context)
|
||||
|
||||
@ -25,7 +25,8 @@
|
||||
|
||||
<p>
|
||||
{% blocktrans trimmed %}
|
||||
This is the last {{ X }} lines of status log Please attatch with the bug when raising a bug.
|
||||
This is the last {{ nr_lines }} lines of status log.
|
||||
If you want to report a bug use <a href="https://github.com/freedombox/Plinth/issues">bugtracker</a> and attach this status log with that.
|
||||
<pre>{{ data }}</pre>
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user