certmonger: avoid mutable default argument

certmonger._get_requests has a mutable default argument.  Although
at the present time it is never modified, this is an antipattern to
be avoided.

In fact, we don't even need the default argument, because it is
always called with a dict() argument.  So just remove it.

Part of: https://pagure.io/freeipa/issue/8186

Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
Fraser Tweedale 2020-01-30 21:01:10 +11:00
parent aae30eb708
commit 0711c4a0d4

View File

@ -156,7 +156,7 @@ class _certmonger(_cm_dbus_object):
DBUS_CM_IF)
def _get_requests(criteria=dict()):
def _get_requests(criteria):
"""
Get all requests that matches the provided criteria.
"""