Changeset 586

Show
Ignore:
Timestamp:
07/28/08 00:46:36 (4 months ago)
Author:
athomas
Message:

Ensure termwidth()/termheight() return -1 if stdout is not a terminal.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cly/trunk/cly/console.py

    r585 r586  
    358358    Returns -1 if the terminal width can not be determined. 
    359359    """ 
     360    if not _stdout_is_a_tty: 
     361        return -1 
    360362    try: 
    361363        import curses 
     
    370372    Returns -1 if the terminal height can not be determined. 
    371373    """ 
     374    if not _stdout_is_a_tty: 
     375        return -1 
    372376    try: 
    373377        import curses