diff options
author | morpheus65535 <[email protected]> | 2021-03-25 14:51:51 -0400 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2021-03-25 14:51:51 -0400 |
commit | ac8eb62de0b3491ed9feefc78e86291afc677263 (patch) | |
tree | 37c0b98474050d0fb550bcc232383754833b0df2 | |
parent | 54eb0fc17411107ed85e9bca0ace4210ae2ad52b (diff) | |
download | bazarr-ac8eb62de0b3491ed9feefc78e86291afc677263.tar.gz bazarr-ac8eb62de0b3491ed9feefc78e86291afc677263.zip |
Fixed issue with log entries without exception stack
-rw-r--r-- | bazarr/api.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bazarr/api.py b/bazarr/api.py index 0c4d9691f..a9d87481b 100644 --- a/bazarr/api.py +++ b/bazarr/api.py @@ -521,8 +521,9 @@ class SystemLogs(Resource): log["timestamp"] = lin[0] log["type"] = lin[1].rstrip() log["message"] = lin[3] - if lin[4] != '\n': - log['exception'] = lin[4].strip('\'').replace(' ', '\u2003\u2003') + if len(lin) > 4: + if lin[4] != '\n': + log['exception'] = lin[4].strip('\'').replace(' ', '\u2003\u2003') logs.append(log) logs.reverse() return jsonify(data=logs) |