VirtualBox

Ignore:
Timestamp:
Nov 23, 2021 9:21:30 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
148456
Message:

ValidationKit: More fixing in testboxscript upgrade code for python compatibility, version 2 and < 3.3 cannot wait with timeout, use own implementation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testboxscript/testboxupgrade.py

    r92573 r92574  
    3535import subprocess
    3636import threading
     37import time
    3738import uuid;
    3839import zipfile
     
    134135    oThread.join(30);
    135136
    136     oChild.wait(5);
     137    # Give child up to 5 seconds to terminate after producing output.
     138    if sys.version_info[0] >= 3 and sys.version_info[1] >= 3:
     139        oChild.wait(5);
     140    else:
     141        for i in range(50):
     142            iStatus = oChild.poll();
     143            if iStatus is None:
     144                break;
     145            time.sleep(0.1);
    137146    iStatus = oChild.poll();
    138147    if iStatus is None:
Note: See TracChangeset for help on using the changeset viewer.

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