Fix: compatibility problem on python3.6

Latest version can't now run on latest ceph/s3tests because of some
compatibility problem of python version.

```
exctype, value, tb = err
return ''.join(traceback.format_exception(exctype, value, tb))
```

value is a string type. But traceback.format_exception refuse to accept
a string as its second parameter in python 3.6
So this change uses traceback.format_tb instead of format_exception.
The output of the two functions are almost the same.

Change-Id: I5a74c83fe6ed5680909f4bdc6cbaedd3ed4bdf3d
Signed-off-by: Pei <huangp0600@126.com>
This commit is contained in:
Huang Pei 2020-05-06 01:11:51 -07:00 committed by Zhiteng Huang
parent 25b1e1fad4
commit 131b2693fa
1 changed files with 1 additions and 1 deletions

View File

@ -493,7 +493,7 @@ class HtmlOutput(Plugin):
def formatErr(self, err):
exctype, value, tb = err
return ''.join(traceback.format_exception(exctype, value, tb))
return ''.join(traceback.format_tb(exctype, value, tb))
def setOutputStream(self, stream):
# grab for Monitoring