Submitter | Pierre-Yves David |
---|---|
Date | Feb. 15, 2017, 11:06 a.m. |
Message ID | <07618a3840fbce3ab108.1487156777@nodosa.octopoid.net> |
Download | mbox | patch |
Permalink | /patch/18506/ |
State | Accepted |
Delegated to: | Martin von Zweigbergk |
Headers | show |
Comments
Patch
diff -r bb59bec58bcd -r 07618a3840fb mercurial/color.py --- a/mercurial/color.py Thu Dec 22 02:26:50 2016 +0100 +++ b/mercurial/color.py Thu Dec 22 02:30:03 2016 +0100 @@ -116,10 +116,6 @@ def loadcolortable(ui, extname, colortab def valideffect(effect): 'Determine if the effect is valid or not.' - good = False - if not _terminfo_params and effect in _effects: - good = True - elif (effect in _terminfo_params - or effect[:-11] in _terminfo_params): - good = True - return good + return ((not _terminfo_params and effect in _effects) + or (effect in _terminfo_params + or effect[:-11] in _terminfo_params))