Skip to content

Commit

Permalink
Merge pull request #133 from jquast/backport-blessings-changes
Browse files Browse the repository at this point in the history
For very lightweight environments, prefer terminal type 'dumb', and in case `TERM=`, that is, an empty string, also use phrase `dumb`, instead of `` or `unknown` as used previously, backporting  4e51546 from erikrose#39
  • Loading branch information
jquast authored Jan 18, 2020
2 parents 55bb6b4 + 84bd761 commit 8554692
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion blessed/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def __init__(self, kind=None, stream=None, force_styling=False):
if platform.system() == 'Windows':
self._kind = kind or curses.get_term(self._init_descriptor)
else:
self._kind = kind or os.environ.get('TERM', 'unknown')
self._kind = kind or os.environ.get('TERM', 'dumb') or 'dumb'

if self.does_styling:
# Initialize curses (call setupterm), so things like tigetstr() work.
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def _get_long_description(fname):
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: User Interfaces',
'Topic :: Terminals'
Expand Down

0 comments on commit 8554692

Please sign in to comment.