VirtualBox

Ignore:
Timestamp:
Feb 28, 2018 3:48:46 PM (7 years ago)
Author:
vboxsync
Message:

utils.py: printOut/Err fix for pipes and files on 2.x

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/common/utils.py

    r71157 r71158  
    7474    """
    7575    sStreamEncoding = sys.stdout.encoding;
     76    if sStreamEncoding is None: sStreamEncoding = 'US-ASCII'; # files, pipes and such on 2.x
    7677    if sStreamEncoding == 'UTF-8' or not isinstance(sString, unicode):
    7778        print(sString);
     
    8485    """
    8586    sStreamEncoding = sys.stderr.encoding;
     87    if sStreamEncoding is None: sStreamEncoding = 'US-ASCII'; # files, pipes and such on 2.x
    8688    if sStreamEncoding == 'UTF-8' or not isinstance(sString, unicode):
    8789        print(sString, file = sys.stderr);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette