1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-01 04:36:13 +01:00

Merge branch 'fix_dod_get_binaries' of https://github.com/lethliel/osc

Support dod binaries in core.get_binarylist.
This commit is contained in:
Marcus Huewe 2018-03-14 14:06:13 +01:00
commit 5341f3aae5
2 changed files with 6 additions and 3 deletions

View File

@ -384,6 +384,9 @@ class Osc(cmdln.Cmdln):
if opts.verbose: if opts.verbose:
for f in result[1]: for f in result[1]:
if f.size is None and f.mtime is None:
print("%9s %12s %-40s" % ('unknown', 'unknown', f.name))
else:
print("%9d %s %-40s" % (f.size, shorttime(f.mtime), f.name)) print("%9d %s %-40s" % (f.size, shorttime(f.mtime), f.name))
else: else:
for f in result[1]: for f in result[1]:

View File

@ -5588,8 +5588,8 @@ def get_binarylist(apiurl, prj, repo, arch, package=None, verbose=False):
for node in tree.findall('binary'): for node in tree.findall('binary'):
f = File(node.get('filename'), f = File(node.get('filename'),
None, None,
int(node.get('size')), int(node.get('size') or 0) or None,
int(node.get('mtime'))) int(node.get('mtime') or 0) or None)
l.append(f) l.append(f)
return l return l