changeset 10452:59f8fff4f887

progress: simplify spacejoin()
author Brodie Rao <me+hg@dackz.net>
date Sat, 13 Feb 2010 23:34:20 -0500
parents 63a9bfad50ff
children 7edc649f9f7e
files hgext/progress.py
diffstat 1 files changed, 1 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/progress.py	Sat Feb 13 23:20:17 2010 -0600
+++ b/hgext/progress.py	Sat Feb 13 23:34:20 2010 -0500
@@ -47,13 +47,7 @@
 from mercurial import util
 
 def spacejoin(*args):
-    ret = ''
-    for s in args:
-        if s:
-            if ret:
-                ret += ' '
-            ret += s
-    return ret
+    return ' '.join(s for s in args if s)
 
 class progbar(object):
     def __init__(self, ui):