mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-27 02:16:12 +01:00
set link_seen after meta_get_file_list
1.) not necessary to iterate through list to test the occurence of a string in a list 2.) removed duplicate tests
This commit is contained in:
parent
38cd884c52
commit
c763369c17
@ -349,18 +349,14 @@ class Osc(cmdln.Cmdln):
|
||||
verbose=opts.verbose,
|
||||
expand=opts.expand,
|
||||
revision=opts.revision)
|
||||
link_seen = '_link' in l
|
||||
if opts.verbose:
|
||||
for i in l:
|
||||
if i.name == '_link':
|
||||
link_seen = True
|
||||
out = [ '%s %7s %9d %s %s' % (i.md5, i.rev, i.size, shorttime(i.mtime), i.name) \
|
||||
for i in l if not fname or fname == i.name ]
|
||||
if len(out) > 0:
|
||||
print_not_found = False
|
||||
print '\n'.join(out)
|
||||
else:
|
||||
if '_link' in l:
|
||||
link_seen = True
|
||||
if fname:
|
||||
if fname in l:
|
||||
print fname
|
||||
|
Loading…
Reference in New Issue
Block a user