I noticed this doing interop testing between 4-11 and 4-13 servers.
There are two places in ipaserver/plugins/dogtag.py where ValueError is caught but no variable is kept but within the except the logger refers to e resulting in
UnboundLocalError: local variable 'e' referenced before assignment
These are in check_request_status and get_certificate.
The same bug is in all branches ipa-4-10 to ipa-4-12
in ipaserver/plugins/dogtag.py::ra:get_certificate()
try: resp = json.loads(ipautil.decode_json(http_body)) except ValueError: logger.debug("Response from CA was not valid JSON: %s", e) raise errors.RemoteRetrieveError( reason=_("Response from CA was not valid JSON")
In ipaserver/plugins/dogtag.py::ra:check_request_status:
try: parse_result = json.loads(ipautil.decode_json(http_body)) except ValueError: logger.debug("Response from CA was not valid JSON: %s", e) raise errors.RemoteRetrieveError( reason=_("Response from CA was not valid JSON")
e is referenced but never set.
Metadata Update from @rcritten: - Issue assigned to rcritten
Metadata Update from @rcritten: - Issue close_status updated to: wontfix - Issue status updated to: Closed (was: Open)
The branches this appears in are all unsupported so it's unlikely to appear in the wild. I had to do manual machinations to provoke it in the first place by tweaking the rewrite rules.