From e35552764971ae317ce836755cf319332e3546af Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Mar 17 2017 15:35:53 +0000 Subject: remove deprecated "filer" calls --- diff --git a/hub/kojihub.py b/hub/kojihub.py index f820c17..7f08266 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -2026,13 +2026,11 @@ def readTagGroups(tag, event=None, inherit=True, incl_pkgs=True, incl_reqs=True) for group in groups.values(): #filter blocked entries and collapse to a list if 'packagelist' in group: - group['packagelist'] = filter(lambda x: not x['blocked'], - group['packagelist'].values()) + group['packagelist'] = [x for x in group['packagelist'].values() if not x['blocked']] if 'grouplist' in group: - group['grouplist'] = filter(lambda x: not x['blocked'], - group['grouplist'].values()) + group['grouplist'] = [x for x in group['grouplist'].values() if not x['blocked']] #filter blocked entries and collapse to a list - return filter(lambda x: not x['blocked'], groups.values()) + return [x for x in groups.values() if not x['blocked']] def set_host_enabled(hostname, enabled=True): context.session.assertPerm('admin') diff --git a/koji/db.py b/koji/db.py index cc84f22..3d4f6f7 100644 --- a/koji/db.py +++ b/koji/db.py @@ -145,7 +145,7 @@ class CursorWrapper: def provideDBopts(**opts): global _DBopts if _DBopts is None: - _DBopts = dict(filter(lambda i: i[1] is not None, opts.items())) + _DBopts = dict([i for i in opts.items() if i[1] is not None]) def setDBopts(**opts): global _DBopts