mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-11 07:06:16 +01:00
Merge branch 'fix_osc_ls_l_empty_size_but_not_empyt_mtime' of https://github.com/lethliel/osc
Do not fail in do_list if f.size or f.mtime is None.
This commit is contained in:
commit
ba0f07db6a
@ -393,6 +393,10 @@ class Osc(cmdln.Cmdln):
|
|||||||
for f in result[1]:
|
for f in result[1]:
|
||||||
if f.size is None and f.mtime is None:
|
if f.size is None and f.mtime is None:
|
||||||
print("%9s %12s %-40s" % ('unknown', 'unknown', f.name))
|
print("%9s %12s %-40s" % ('unknown', 'unknown', f.name))
|
||||||
|
elif f.size is None and f.mtime is not None:
|
||||||
|
print("%9s %s %-40s" % ('unknown', shorttime(f.mtime), f.name))
|
||||||
|
elif f.size is not None and f.mtime is None:
|
||||||
|
print("%9d %12s %-40s" % (f.size, 'unknown', f.name))
|
||||||
else:
|
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:
|
||||||
|
Loading…
Reference in New Issue
Block a user