VirtualBox

Ignore:
Timestamp:
Mar 8, 2022 2:44:28 PM (3 years ago)
Author:
vboxsync
Message:

ValKit/tests: pylint 2.9.6 adjustments (mostly about using 'with' statements).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/serial/loopback.py

    r93115 r94127  
    224224        Shutdown any connection and wait for it to become idle.
    225225        """
    226         self.oLock.acquire();
    227         self.fShutdown = True;
    228         self.oLock.release();
     226        with self.oLock:
     227            self.fShutdown = True;
    229228        self.oIoPumper.shutdown();
    230229
     
    233232        Returns whether the I/O pumping thread should shut down.
    234233        """
    235         self.oLock.acquire();
    236         fShutdown = self.fShutdown;
    237         self.oLock.release();
     234        with self.oLock:
     235            fShutdown = self.fShutdown;
    238236
    239237        return fShutdown;
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