From 995b57c961dd02019ae4ab0e50f2ceaa299398db Mon Sep 17 00:00:00 2001 From: Jana Cupova Date: Wed, 2 Feb 2022 08:23:55 +0100 Subject: [PATCH] Remove koji.listFaults Fixes: https://pagure.io/koji/issue/3083 --- koji/__init__.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/koji/__init__.py b/koji/__init__.py index fa89f3bb..aca48646 100644 --- a/koji/__init__.py +++ b/koji/__init__.py @@ -473,29 +473,6 @@ def convertFault(fault): return fault -def listFaults(): - """Return a list of faults - - Returns a list of dictionaries whose keys are: - faultCode: the numeric code used in fault conversion - name: the name of the exception - desc: the description of the exception (docstring) - """ - util.deprecated("method listFaults is deprecated and will be removed in 1.29") - ret = [] - for n, v in globals().items(): - if isinstance(v, type(Exception)) and issubclass(v, GenericError): - code = getattr(v, 'faultCode', None) - if code is None: - continue - info = {} - info['faultCode'] = code - info['name'] = n - info['desc'] = getattr(v, '__doc__', None) - ret.append(info) - ret.sort(key=lambda x: x['faultCode']) - return ret - # functions for encoding/decoding optional arguments