Commit f6c196fe authored by Nicolas Wavrant's avatar Nicolas Wavrant

runner: /viewLog prints correct error when log file doesn't exist

parent f7aa38b5
...@@ -220,6 +220,8 @@ def getFileLog(): ...@@ -220,6 +220,8 @@ def getFileLog():
else: else:
file_path = realpath(app.config, logfile) file_path = realpath(app.config, logfile)
try: try:
if not os.path.exists(file_path):
raise IOError
if not isText(file_path): if not isText(file_path):
return jsonify(code=0, return jsonify(code=0,
result="Can not open binary file, please select a text file!") result="Can not open binary file, please select a text file!")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment