Commits

David Ibáñez  committed 81c0ed3

Python 3: fix 'Error_set_py_obj'

  • Participants
  • Parent commits 160cf64

Comments (0)

Files changed (1)

         PyErr_SetObject(PyExc_KeyError, py_obj);
         return NULL;
     }
-    py_str = PyObject_Str(py_obj);
+    py_str = PyObject_Bytes(py_obj);
     str = py_str ? PyString_AS_STRING(py_str) : "<error in __str__>";
     PyErr_Format(Error_type(err), "%s: %s", str, git_lasterror());
     Py_XDECREF(py_str);