Submitter | phabricator |
---|---|
Date | May 21, 2018, 6:39 p.m. |
Message ID | <1ef71ee8436dfce1a2530a8844812dfe@localhost.localdomain> |
Download | mbox | patch |
Permalink | /patch/31789/ |
State | Not Applicable |
Headers | show |
Comments
Patch
diff --git a/mercurial/cext/pathencode.c b/mercurial/cext/pathencode.c --- a/mercurial/cext/pathencode.c +++ b/mercurial/cext/pathencode.c @@ -655,14 +655,7 @@ PyObject *shaobj, *hashobj; if (shafunc == NULL) { - PyObject *hashlib, *name = PyBytes_FromString("hashlib"); - - if (name == NULL) - return -1; - - hashlib = PyImport_ImportModule("hashlib"); - Py_DECREF(name); - + PyObject *hashlib = PyImport_ImportModule("hashlib"); if (hashlib == NULL) { PyErr_SetString(PyExc_ImportError, "pathencode failed to find hashlib");