diff options
Diffstat (limited to 'subcmds/forall.py')
-rw-r--r-- | subcmds/forall.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/subcmds/forall.py b/subcmds/forall.py index 76a02688..2ece95ed 100644 --- a/subcmds/forall.py +++ b/subcmds/forall.py | |||
@@ -141,12 +141,16 @@ terminal and are not redirected. | |||
141 | for cn in cmd[1:]: | 141 | for cn in cmd[1:]: |
142 | if not cn.startswith('-'): | 142 | if not cn.startswith('-'): |
143 | break | 143 | break |
144 | if cn in _CAN_COLOR: | 144 | else: |
145 | cn = None | ||
146 | # pylint: disable-msg=W0631 | ||
147 | if cn and cn in _CAN_COLOR: | ||
145 | class ColorCmd(Coloring): | 148 | class ColorCmd(Coloring): |
146 | def __init__(self, config, cmd): | 149 | def __init__(self, config, cmd): |
147 | Coloring.__init__(self, config, cmd) | 150 | Coloring.__init__(self, config, cmd) |
148 | if ColorCmd(self.manifest.manifestProject.config, cn).is_on: | 151 | if ColorCmd(self.manifest.manifestProject.config, cn).is_on: |
149 | cmd.insert(cmd.index(cn) + 1, '--color') | 152 | cmd.insert(cmd.index(cn) + 1, '--color') |
153 | # pylint: enable-msg=W0631 | ||
150 | 154 | ||
151 | mirror = self.manifest.IsMirror | 155 | mirror = self.manifest.IsMirror |
152 | out = ForallColoring(self.manifest.manifestProject.config) | 156 | out = ForallColoring(self.manifest.manifestProject.config) |