Skip to content

Commit

Permalink
Merge pull request #1 from jayschwa/patch-1
Browse files Browse the repository at this point in the history
Fix `KeyError` when `TERM_PROGRAM` is undefined
  • Loading branch information
kodie authored Jun 19, 2018
2 parents 48cfdf9 + cb10aa4 commit 25a4b90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ansiescapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os

ESC = '\u001B['
isTerminalApp = 1 if os.environ['TERM_PROGRAM'] == 'Apple_Terminal' else 0
isTerminalApp = os.environ.get('TERM_PROGRAM') == 'Apple_Terminal'

def _(s): return s.decode('unicode_escape');

Expand Down

0 comments on commit 25a4b90

Please sign in to comment.