~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to terminal.py

  • Committer: Aaron Bentley
  • Date: 2008-06-03 14:46:55 UTC
  • Revision ID: aaron@aaronbentley.com-20080603144655-8v3zq81xmlwefg2d
Fix behavior when TERM is set to nothing

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    if sys.platform == "win32":
29
29
        return False
30
30
    import curses
31
 
    curses.setupterm()
 
31
    try:
 
32
        curses.setupterm()
 
33
    except curses.error:
 
34
        return False
32
35
    return bool(curses.tigetstr('setaf'))
33
36
 
34
37
colors = {