Alon Bar-Lev has uploaded a new change for review. Change subject: packaging: setup: handle a yum error when no groups ......................................................................
packaging: setup: handle a yum error when no groups apparently, when querying yum for group, if no groups at all it raises an exception instead of return empty set. this is unexpected behavior of an api. Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=973383 Change-Id: Ifb1f196006662d6571c7ca80554e0a9a17aaec2a Signed-off-by: Alon Bar-Lev <[email protected]> --- M src/otopi/miniyum.py 1 file changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/otopi refs/changes/46/15746/1 diff --git a/src/otopi/miniyum.py b/src/otopi/miniyum.py index d9c8731..9908d63 100755 --- a/src/otopi/miniyum.py +++ b/src/otopi/miniyum.py @@ -794,11 +794,12 @@ raise def queryGroups(self): + ret = [] + try: with self._disableOutput: installed, available = self._yb.doGroupLists() - ret = [] for grp in installed: ret.append({ 'operation': 'installed', @@ -811,13 +812,15 @@ 'name': grp.name, 'uservisible': grp.user_visible }) - - return ret - + except yum.Errors.GroupsError as e: + # rhbz#973383 empty groups raises an exception + self._sink.verbose('Ignoring group error: %s' % e) except Exception as e: self._sink.error(e) raise + return ret + def queryPackages(self, pkgnarrow='all', patterns=None, showdups=None): try: with self._disableOutput: -- To view, visit http://gerrit.ovirt.org/15746 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifb1f196006662d6571c7ca80554e0a9a17aaec2a Gerrit-PatchSet: 1 Gerrit-Project: otopi Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
