summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2008-06-30 21:18:58 +0200
committerHans Ulrich Niedermann <hun@n-dimensional.de>2008-07-15 12:28:55 +0200
commit70708c53812eda6cf6021fb3818a50fc81beac67 (patch)
treeb0e9809f167712a8bd8c3de36e672ae689af4dd8
parentdf6f2e33efea03f5428b8a008eb6296b560d98dc (diff)
downloadnbb-70708c53812eda6cf6021fb3818a50fc81beac67.tar.gz
nbb-70708c53812eda6cf6021fb3818a50fc81beac67.tar.xz
nbb-70708c53812eda6cf6021fb3818a50fc81beac67.zip
Replace list.append with itertools.chain() call
-rw-r--r--src/nbblib/vcs.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nbblib/vcs.py b/src/nbblib/vcs.py
index c24b88e..f2a4ea5 100644
--- a/src/nbblib/vcs.py
+++ b/src/nbblib/vcs.py
@@ -1,6 +1,7 @@
import os
import logging
import urlparse
+import itertools
from nbblib import package
from nbblib import progutils
@@ -46,9 +47,9 @@ class AmbigousVCSDetection(plugins.AmbigousPluginDetection):
self.srcdir = srcdir
def __str__(self):
# We possibly need to re-add m.tree_root here again soon
- alist = [('VCS type', 'Branch name', )]
- alist.extend(((name, m.branch_name, )
- for name, m in self.matches.iteritems()))
+ alist = itertools.chain([('VCS type', 'Branch name', )],
+ (((name, m.branch_name, )
+ for name, m in self.matches.iteritems())))
table = "\n".join([" %-9s %s" % a for a in alist])
return "Ambigous VCS types detected for %s:\n%s" % (repr(self.srcdir), table)