VirtualBox

Ignore:
Timestamp:
Dec 22, 2019 6:51:55 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
135520
Message:

TestManager/webservergluebase.py: Python 3 adjust.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/core/webservergluebase.py

    r79092 r82633  
    8989
    9090        # Output.
    91         self.oOutputRaw = sys.stdout;
    92         self.oOutputText = codecs.getwriter('utf-8')(sys.stdout);
     91        if sys.version_info[0] >= 3:
     92            self.oOutputRaw = sys.stdout.detach();
     93            sys.stdout = None; # Prevents flush_std_files() from complaining on stderr during sys.exit().
     94        else:
     95            self.oOutputRaw = sys.stdout;
     96        self.oOutputText = codecs.getwriter('utf-8')(self.oOutputRaw);
    9397
    9498
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