From c763369c170854df516706fbe9e03d62c5519a60 Mon Sep 17 00:00:00 2001 From: Michal Vyskocil Date: Tue, 6 Apr 2010 10:57:49 +0200 Subject: [PATCH] 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 --- osc/commandline.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index b5b3dc49..8a48ea83 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -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