mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-14 01:26:23 +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,
|
verbose=opts.verbose,
|
||||||
expand=opts.expand,
|
expand=opts.expand,
|
||||||
revision=opts.revision)
|
revision=opts.revision)
|
||||||
|
link_seen = '_link' in l
|
||||||
if opts.verbose:
|
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) \
|
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 ]
|
for i in l if not fname or fname == i.name ]
|
||||||
if len(out) > 0:
|
if len(out) > 0:
|
||||||
print_not_found = False
|
print_not_found = False
|
||||||
print '\n'.join(out)
|
print '\n'.join(out)
|
||||||
else:
|
else:
|
||||||
if '_link' in l:
|
|
||||||
link_seen = True
|
|
||||||
if fname:
|
if fname:
|
||||||
if fname in l:
|
if fname in l:
|
||||||
print fname
|
print fname
|
||||||
|
Loading…
Reference in New Issue
Block a user