mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
fix getbinaries with DOD binaries
getbinaries of dod binaries do not have a size or mtime. This will break. So just set to None and print unkown instead.
This commit is contained in:
parent
8cb0246c10
commit
9b42897413
@ -384,7 +384,10 @@ class Osc(cmdln.Cmdln):
|
||||
|
||||
if opts.verbose:
|
||||
for f in result[1]:
|
||||
print("%9d %s %-40s" % (f.size, shorttime(f.mtime), f.name))
|
||||
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))
|
||||
else:
|
||||
for f in result[1]:
|
||||
print(indent+f)
|
||||
|
@ -5587,8 +5587,8 @@ def get_binarylist(apiurl, prj, repo, arch, package=None, verbose=False):
|
||||
for node in tree.findall('binary'):
|
||||
f = File(node.get('filename'),
|
||||
None,
|
||||
int(node.get('size')),
|
||||
int(node.get('mtime')))
|
||||
int(node.get('size') or 0) or None,
|
||||
int(node.get('mtime') or 0) or None)
|
||||
l.append(f)
|
||||
return l
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user