mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix error log (#2349)
This commit is contained in:
parent
278514b994
commit
a564fe8286
@ -437,7 +437,7 @@ class HomeAssistantView(object):
|
|||||||
mimetype = mimetypes.guess_type(fil)[0]
|
mimetype = mimetypes.guess_type(fil)[0]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
fil = open(fil)
|
fil = open(fil, mode='br')
|
||||||
except IOError:
|
except IOError:
|
||||||
raise NotFound()
|
raise NotFound()
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ class TestAPI(unittest.TestCase):
|
|||||||
|
|
||||||
def test_api_get_error_log(self):
|
def test_api_get_error_log(self):
|
||||||
"""Test the return of the error log."""
|
"""Test the return of the error log."""
|
||||||
test_content = 'Test String'
|
test_content = 'Test String°'
|
||||||
with tempfile.NamedTemporaryFile() as log:
|
with tempfile.NamedTemporaryFile() as log:
|
||||||
log.write(test_content.encode('utf-8'))
|
log.write(test_content.encode('utf-8'))
|
||||||
log.flush()
|
log.flush()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user