diff --git a/bumpversion/vcs.py b/bumpversion/vcs.py index c5516f4..6538234 100644 --- a/bumpversion/vcs.py +++ b/bumpversion/vcs.py @@ -67,7 +67,9 @@ def assert_nondirty(cls): if lines: raise WorkingDirectoryIsDirtyException( - "Git working directory is not clean:\n{}".format(b"\n".join(lines)) + "Git working directory is not clean:\n{}".format( + b"\n".join(lines).decode() + ) ) @classmethod @@ -143,7 +145,7 @@ def assert_nondirty(cls): if lines: raise WorkingDirectoryIsDirtyException( "Mercurial working directory is not clean:\n{}".format( - b"\n".join(lines) + b"\n".join(lines).decode() ) ) diff --git a/tests/test_cli.py b/tests/test_cli.py index 28aacad..5b5addf 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -412,7 +412,7 @@ def test_dirty_work_dir(tmpdir, vcs): check_call([vcs, "add", "dirty"]) vcs_name = "Mercurial" if vcs == "hg" else "Git" - vcs_output = "b'A dirty'" if vcs == "hg" else "b'A dirty'" + vcs_output = "A dirty" if vcs == "hg" else "A dirty" with pytest.raises(WorkingDirectoryIsDirtyException): with LogCapture() as log_capture: