VirtualBox

Changeset 84072 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Apr 29, 2020 7:42:49 AM (5 years ago)
Author:
vboxsync
Message:

Validation Kit/testdriver: Handle older VBox versions which don't have a specific event in handleEvent().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/vbox.py

    r83990 r84072  
    717717                reporter.logXcpt();
    718718        ## @todo implement the other events.
    719         if eType not in (vboxcon.VBoxEventType_OnMousePointerShapeChanged,
    720                          vboxcon.VBoxEventType_OnCursorPositionChanged):
    721             if eType in self.dEventNo2Name:
    722                 reporter.log2('%s(%s)/%s' % (self.dEventNo2Name[eType], str(eType), self.sName));
    723             else:
    724                 reporter.log2('%s/%s' % (str(eType), self.sName));
     719        try:
     720            if eType not in (vboxcon.VBoxEventType_OnMousePointerShapeChanged,
     721                             vboxcon.VBoxEventType_OnCursorPositionChanged):
     722                if eType in self.dEventNo2Name:
     723                    reporter.log2('%s(%s)/%s' % (self.dEventNo2Name[eType], str(eType), self.sName));
     724                else:
     725                    reporter.log2('%s/%s' % (str(eType), self.sName));
     726        except AttributeError: # Handle older VBox versions which don't have a specific event.
     727            pass;
    725728        return None;
    726729
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