osc cycle: correctly handle comma-separated arg list

This commit is contained in:
Dominique Leuenberger 2019-01-17 15:56:16 +01:00
parent f8b4b43745
commit 0ba57f332e
Signed by untrusted user: dimstar
GPG Key ID: E69F22089B497C99

View File

@ -16,9 +16,8 @@ def do_cycle(self, subcmd, opts, *args):
apiurl = self.get_api_url()
print ("digraph depgraph {")
args = [pkg.strip() for pkglist in args for pkg in pkglist.split(',') if pkg.strip()]
for pkgname in args:
pkgname = pkgname.strip(',')
if len(pkgname) == 0: continue
try:
deps = ET.fromstring(get_dependson(apiurl, "openSUSE:Factory", "standard", "x86_64", [pkgname]))