Bug 915508 - Change the order of space and comma in the mach status line when several directories are built at the same time; r=gps

This commit is contained in:
Mike Hommey 2013-09-12 15:14:11 +09:00
Родитель fe1fc8267b
Коммит 1cbed4b592
1 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -4,6 +4,7 @@
from __future__ import print_function, unicode_literals
import itertools
import logging
import operator
import os
@ -160,11 +161,12 @@ class BuildProgressFooter(object):
' ',
'(',
])
for d in active_dirs:
parts.extend([
('magenta', d), ' ,'
])
parts[-1] = ')'
if active_dirs:
commas = [', '] * (len(active_dirs) - 1)
magenta_dirs = [('magenta', d) for d in active_dirs]
parts.extend(i.next() for i in itertools.cycle((iter(magenta_dirs),
iter(commas))))
parts.append(')')
if not have_dirs:
parts = parts[0:-2]