Changeset 70521 in vbox for trunk/src/VBox/ValidationKit/testdriver/vboxwrappers.py
- Timestamp:
- Jan 10, 2018 3:49:10 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testdriver/vboxwrappers.py
r70508 r70521 32 32 33 33 # Standard Python imports. 34 import os 35 import socket 34 import os; 35 import socket; 36 import sys; 36 37 37 38 # Validation Kit imports. … … 480 481 if fErrorOnTimeout: 481 482 if fIgnoreErrors: 482 reporter.log('Timing out after waiting for % us on "%s" operation %d' \483 reporter.log('Timing out after waiting for %s s on "%s" operation %d' \ 483 484 % (cMsTimeout / 1000, self.sName, iOperation)) 484 485 else: 485 reporter.error('Timing out after waiting for % us on "%s" operation %d' \486 reporter.error('Timing out after waiting for %s s on "%s" operation %d' \ 486 487 % (cMsTimeout / 1000, self.sName, iOperation)) 487 488 return -1; … … 1544 1545 sHostIP = socket.gethostbyname(sHostName) 1545 1546 abHostIP = socket.inet_aton(sHostIP) 1546 if ord(abHostIP[0]) == 127 \ 1547 or (ord(abHostIP[0]) == 169 and ord(abHostIP[1]) == 254) \ 1548 or (ord(abHostIP[0]) == 192 and ord(abHostIP[1]) == 168 and ord(abHostIP[2]) == 56): 1547 if sys.version_info[0] < 3: 1548 abHostIP = (ord(abHostIP[0]), ord(abHostIP[1]), ord(abHostIP[2]), ord(abHostIP[3])); 1549 if abHostIP[0] == 127 \ 1550 or (abHostIP[0] == 169 and abHostIP[1] == 254) \ 1551 or (abHostIP[0] == 192 and abHostIP[1] == 168 and abHostIP[2] == 56): 1549 1552 reporter.log('warning: host IP for "%s" is %s, most likely not unique.' % (sHostName, sHostIP)) 1550 1553 except: … … 1552 1555 return False 1553 1556 sDefaultMac = '%02X%02X%02X%02X%02X%02X' \ 1554 % (0x02, ord(abHostIP[0]), ord(abHostIP[1]), ord(abHostIP[2]), ord(abHostIP[3]), iNic)1557 % (0x02, abHostIP[0], abHostIP[1], abHostIP[2], abHostIP[3], iNic) 1555 1558 sMacAddr = sDefaultMac[0:(12 - cchMacAddr)] + sMacAddr 1556 1559 … … 2833 2836 2834 2837 oTxsSession = txsclient.tryOpenTcpSession(cMsTimeout, sHostname, fReversedSetup = fReversed, 2835 cMsIdleFudge = cMsTimeout / 2);2838 cMsIdleFudge = cMsTimeout // 2); 2836 2839 if oTxsSession is None: 2837 2840 return False;
Note:
See TracChangeset
for help on using the changeset viewer.