diff --git a/dulwich/objects.py b/dulwich/objects.py index e5b8c2a4a..754f9a356 100644 --- a/dulwich/objects.py +++ b/dulwich/objects.py @@ -91,7 +91,7 @@ def hex_to_sha(hex): except TypeError as exc: if not isinstance(hex, str): raise - raise ValueError(exc.message) + raise ValueError(exc.args[0]) def hex_to_filename(path, hex):