mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-25 03:32: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:
|
if opts.verbose:
|
||||||
for f in result[1]:
|
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:
|
else:
|
||||||
for f in result[1]:
|
for f in result[1]:
|
||||||
print(indent+f)
|
print(indent+f)
|
||||||
|
@ -5587,8 +5587,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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user