Show
Ignore:
Timestamp:
10/11/12 20:00:17 (7 years ago)
Author:
leonwlaw
Message:

Fix for UTF giving false errors due to importing the readline module in Mac for Python 2.6.6. #1110.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • seattle/trunk/utf/utf.py

    r5649 r5968  
    507507  (rawout, error) = utfutil.execute(popen_args) 
    508508 
     509  # Get rid of an escape sequence that Mac's readline prints out on import. #1110 
     510  # I'm assuming this will only occur at the very beginning of stdout. Possible bug? 
     511  # Should we also do this for the stderr? 
     512  escape_sequence = '\x1b[?1034h' 
     513  if out.startswith(escape_sequence): 
     514    out = out[len(escape_sequence):] 
     515 
    509516  # Get rid of debug output on Android, #1084. 
    510517  out = strip_android_debug_messages(rawout) 
     
    520527     
    521528  elif out: # If not, make sure the standard out is empty. 
    522     report[ERROR_PRAGMA] = (out, None) 
    523  
     529    report[OUT_PRAGMA] = (out, None) 
    524530 
    525531  # Is this executable suppose to produce any output on standard error?