From c78b5b595d2a29dd71b97e31b0b378d63ba9690f Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Feb 03 2015 11:50:54 +0000 Subject: Fix repoquery runs for packages with no deps When we try to list deps for empty packages repoquery fails and we don't handle it well --- diff --git a/src/FedoraReview/deps.py b/src/FedoraReview/deps.py index 4dce8ba..3bf0f8e 100644 --- a/src/FedoraReview/deps.py +++ b/src/FedoraReview/deps.py @@ -1,4 +1,4 @@ -#-*- coding: utf-8 -*- +# -*- coding: utf-8 -*- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -43,6 +43,9 @@ def list_deps(pkgs): if not isinstance(pkgs, list): pkgs = [pkgs] + if not pkgs: + return [] + cmd = ['repoquery', '-C', '--requires', '--resolve'] cmd.extend(pkgs) Settings.get_logger().debug("Running: " + ' '.join(cmd))