Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 567befa

Browse files
committed
Merge remote-tracking branch 'upstream/v1.2.x' into v1.3.x
2 parents 4c50036 + 79d5905 commit 567befa

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/matplotlib/cbook.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,8 +1173,10 @@ def pieces(seq, num=2):
11731173

11741174

11751175
def exception_to_str(s=None):
1176-
1177-
sh = io.StringIO()
1176+
if sys.version_info[0] < 3:
1177+
sh = io.BytesIO()
1178+
else:
1179+
sh = io.StringIO()
11781180
if s is not None:
11791181
print(s, file=sh)
11801182
traceback.print_exc(file=sh)

0 commit comments

Comments
 (0)