summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjquast <contact@jeffquast.com>2014-09-06 13:53:30 -0700
committerjquast <contact@jeffquast.com>2014-09-06 13:53:30 -0700
commitf0ceed10c147be4ab85ef09c92673cebd14863f6 (patch)
tree4e659bf5f55b7849c68a39c95cfda26110b5acda
parent9eb00f05eae3d0c924be997d6aad0719226a1aaf (diff)
downloadblessings-f0ceed10c147be4ab85ef09c92673cebd14863f6.tar.gz
bugfix term kind normalization
-rw-r--r--blessed/formatters.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/blessed/formatters.py b/blessed/formatters.py
index 38bd429..c63f242 100644
--- a/blessed/formatters.py
+++ b/blessed/formatters.py
@@ -136,12 +136,9 @@ def get_proxy_string(term, attr):
Returns instance of ParameterizingProxyString or NullCallableString.
"""
-
# normalize 'screen-256color', or 'ansi.sys' to its basic names
- _normalize = ('screen', 'ansi',)
- term = next(iter(_simp for _simp in _normalize
- if term.kind.startswith(_simp)), term)
-
+ term_kind = next(iter(_kind for _kind in ('screen', 'ansi',)
+ if term.kind.startswith(_kind)), term)
return {
'screen': {
# proxy move_x/move_y for 'screen' terminal type.
@@ -157,7 +154,7 @@ def get_proxy_string(term, attr):
'cnorm': ParameterizingProxyString(
(u'\x1b[?25h', lambda *arg: ()), term.normal, attr),
}
- }.get(term.kind, {}).get(attr, None)
+ }.get(term_kind, {}).get(attr, None)
class FormattingString(text_type):