VirtualBox

Ignore:
Timestamp:
Jun 11, 2019 11:58:28 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
131247
Message:

ValKit: New pylint version - cleanup in progress.

File:
1 edited

Legend:

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

    r76553 r79087  
    259259    def __init__(self):
    260260        SchedGroupData.__init__(self);
    261         self.aoMembers          = [];       # type: SchedGroupMemberDataEx
     261        self.aoMembers          = []        # type: SchedGroupMemberDataEx
    262262
    263263        # Two build sources for convenience sake.
    264         self.oBuildSrc          = None;     # type: TestBoxData
    265         self.oBuildSrcValidationKit = None; # type: TestBoxData
     264        self.oBuildSrc          = None      # type: TestBoxData
     265        self.oBuildSrcValidationKit = None  # type: TestBoxData
    266266        # List of test boxes that uses this group for convenience.
    267         self.aoTestBoxes        = None;     # type: list[TestBoxData]
     267        self.aoTestBoxes        = None      # type: list[TestBoxData]
    268268
    269269    def _initExtraMembersFromDb(self, oDb, tsNow = None, sPeriodBack = None):
     
    421421
    422422
    423 class SchedGroupLogic(ModelLogicBase): # pylint: disable=R0903
     423class SchedGroupLogic(ModelLogicBase): # pylint: disable=too-few-public-methods
    424424    """
    425425    SchedGroup logic.
     
    578578                raise TMRowInUse('Scheduling group #%d is associated with one or more test boxes: %s'
    579579                                 % (idSchedGroup, ', '.join(asTestBoxes),));
    580             else:
    581                 # Reassign testboxes to scheduling group #1 (the default group).
    582                 oTbLogic = TestBoxLogic(self._oDb);
    583                 for oTestBox in oData.aoTestBoxes:
    584                     oTbCopy = TestBoxData().initFromOther(oTestBox);
    585                     oTbCopy.idSchedGroup = 1;
    586                     oTbLogic.editEntry(oTbCopy, uidAuthor, fCommit = False);
    587 
    588                 oData = SchedGroupDataEx().initFromDbWithId(self._oDb, idSchedGroup);
    589                 if oData.aoTestBoxes:
    590                     raise TMRowInUse('More testboxes was added to the scheduling group as we were trying to delete it.');
     580            # Reassign testboxes to scheduling group #1 (the default group).
     581            oTbLogic = TestBoxLogic(self._oDb);
     582            for oTestBox in oData.aoTestBoxes:
     583                oTbCopy = TestBoxData().initFromOther(oTestBox);
     584                oTbCopy.idSchedGroup = 1;
     585                oTbLogic.editEntry(oTbCopy, uidAuthor, fCommit = False);
     586
     587            oData = SchedGroupDataEx().initFromDbWithId(self._oDb, idSchedGroup);
     588            if oData.aoTestBoxes:
     589                raise TMRowInUse('More testboxes was added to the scheduling group as we were trying to delete it.');
    591590
    592591        #
     
    982981#
    983982
    984 # pylint: disable=C0111
     983# pylint: disable=missing-docstring
    985984class SchedGroupMemberDataTestCase(ModelDataBaseTestCase):
    986985    def setUp(self):
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