Skip to content

Commit

Permalink
Fix KeyError when TERM_PROGRAM is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
jayschwa authored Jun 12, 2018
1 parent 48cfdf9 commit cb10aa4
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 cb10aa4

Please sign in to comment.