progress: simplify spacejoin()
authorBrodie Rao <me+hg@dackz.net>
Sat, 13 Feb 2010 23:34:20 -0500
changeset 10452 59f8fff4f887
parent 10451 63a9bfad50ff
child 10453 7edc649f9f7e
progress: simplify spacejoin()
hgext/progress.py
--- 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):