Skip to content

Commit a4adf51

Browse files
committed
Fix TypeError
can only concatenate str (not "bytes") to str
1 parent 4265ab3 commit a4adf51

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog/5782.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix decoding error when printing an error response from ``--pastebin``.

src/_pytest/pastebin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def create_new_paste(contents):
7272
if m:
7373
return "{}/show/{}".format(url, m.group(1))
7474
else:
75-
return "bad response: " + response
75+
return "bad response: " + response.decode("utf-8")
7676

7777

7878
def pytest_terminal_summary(terminalreporter):

0 commit comments

Comments
 (0)