diff options
| author | Scott Bahling <sbahling@suse.de> | 2018-08-03 16:43:53 +0200 |
|---|---|---|
| committer | Scott Bahling <sbahling@suse.de> | 2018-08-03 16:43:53 +0200 |
| commit | 260c43864224f798c9d939c594d267b60410c6f5 (patch) | |
| tree | acda636a9609264e32cca8b0f19354feeca20151 /obsapi/core.py | |
| parent | b15e41a14f03d66f54353a7185cc57319c16ee17 (diff) | |
| download | obsapi-0.0.8.tar.gz obsapi-0.0.8.tar.xz obsapi-0.0.8.zip | |
Build get now returns None on failure. Handle appropriatelyobsapi-0.0.8
Diffstat (limited to 'obsapi/core.py')
| -rw-r--r-- | obsapi/core.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/obsapi/core.py b/obsapi/core.py index 090c953..6da0b67 100644 --- a/obsapi/core.py +++ b/obsapi/core.py @@ -194,12 +194,14 @@ class ObsApi(object): return sinfo def binaries_ls(self, prj, pkg, repo, arch): + binaries = [] xml = self.build.get(prj, repo, arch, pkg) - blist = etree.fromstring(xml) - binaries = [Binary(filename=i.get('filename'), - size=i.get('size'), - mtime=i.get('mtime')) - for i in blist.findall('binary')] + if xml: + blist = etree.fromstring(xml) + binaries = [Binary(filename=i.get('filename'), + size=i.get('size'), + mtime=i.get('mtime')) + for i in blist.findall('binary')] return binaries |
