Create distinct fileinput objects in htmlifier.
* .../logs/htmlify-screen-log.py: fileinput.input is a global attempting to update it when it is already active causes problems. Instead create dinstinct FileInput objects for iterating over files to avoid problems with globals. Change-Id: I6ac585e55c918b9bcdb188d347049cbb3abb4125
This commit is contained in:
parent
5b3b157650
commit
5bb7c62058
@ -81,7 +81,7 @@ def link_timestamp(line):
|
|||||||
|
|
||||||
|
|
||||||
def passthrough_filter(fname):
|
def passthrough_filter(fname):
|
||||||
for line in fileinput.input(fname, openhook=fileinput.hook_compressed):
|
for line in fileinput.FileInput(fname, openhook=fileinput.hook_compressed):
|
||||||
yield line
|
yield line
|
||||||
|
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ def html_filter(fname):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
yield _css_preamble()
|
yield _css_preamble()
|
||||||
for line in fileinput.input(fname, openhook=fileinput.hook_compressed):
|
for line in fileinput.FileInput(fname, openhook=fileinput.hook_compressed):
|
||||||
newline = escape_html(line)
|
newline = escape_html(line)
|
||||||
newline = color_by_sev(newline)
|
newline = color_by_sev(newline)
|
||||||
newline = link_timestamp(newline)
|
newline = link_timestamp(newline)
|
||||||
@ -122,7 +122,7 @@ def html_filter(fname):
|
|||||||
def htmlify_stdin():
|
def htmlify_stdin():
|
||||||
out = sys.stdout
|
out = sys.stdout
|
||||||
out.write(_css_preamble())
|
out.write(_css_preamble())
|
||||||
for line in fileinput.input():
|
for line in fileinput.FileInput():
|
||||||
newline = escape_html(line)
|
newline = escape_html(line)
|
||||||
newline = color_by_sev(newline)
|
newline = color_by_sev(newline)
|
||||||
newline = link_timestamp(newline)
|
newline = link_timestamp(newline)
|
||||||
|
Loading…
Reference in New Issue
Block a user