From d59756912cd450b0af3d8893b822c66dafe42544 Mon Sep 17 00:00:00 2001 From: Enrico Jörns Date: Fri, 31 Mar 2023 12:26:22 +0200 Subject: oeqa: whitespace and indentation cleanups (From OE-Core rev: 4922221d1259e2f78233f17bb901cdac5b9aa520) Signed-off-by: Enrico Jorns Signed-off-by: Richard Purdie --- meta/lib/oeqa/utils/commands.py | 2 +- meta/lib/oeqa/utils/qemurunner.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'meta/lib/oeqa/utils') diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index 9b07227f12..c1f533802e 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py @@ -115,7 +115,7 @@ class Command(object): else: deadline = time.time() + self.timeout for thread in self.threads: - timeout = deadline - time.time() + timeout = deadline - time.time() if timeout < 0: timeout = 0 thread.join(timeout) diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index c6e4a34bce..6734cee48d 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py @@ -238,7 +238,7 @@ class QemuRunner: self.origchldhandler = signal.getsignal(signal.SIGCHLD) signal.signal(signal.SIGCHLD, self.handleSIGCHLD) - self.logger.debug('launchcmd=%s'%(launch_cmd)) + self.logger.debug('launchcmd=%s' % (launch_cmd)) # FIXME: We pass in stdin=subprocess.PIPE here to work around stty # blocking at the end of the runqemu script when using this within @@ -332,8 +332,8 @@ class QemuRunner: try: os.chdir(os.path.dirname(qmp_port)) try: - from qmp.legacy import QEMUMonitorProtocol - self.qmp = QEMUMonitorProtocol(os.path.basename(qmp_port)) + from qmp.legacy import QEMUMonitorProtocol + self.qmp = QEMUMonitorProtocol(os.path.basename(qmp_port)) except OSError as msg: self.logger.warning("Failed to initialize qemu monitor socket: %s File: %s" % (msg, msg.filename)) return False @@ -343,8 +343,8 @@ class QemuRunner: self.logger.debug("QMP Port does not exist waiting for it to be created") endtime = time.time() + self.runqemutime while not os.path.exists(qmp_port) and self.is_alive() and time.time() < endtime: - self.logger.info("QMP port does not exist yet!") - time.sleep(0.5) + self.logger.info("QMP port does not exist yet!") + time.sleep(0.5) if not os.path.exists(qmp_port) and self.is_alive(): self.logger.warning("QMP Port still does not exist but QEMU is alive") return False @@ -419,7 +419,7 @@ class QemuRunner: except (IndexError, ValueError): # Try to get network configuration from runqemu output match = re.match(r'.*Network configuration: (?:ip=)*([0-9.]+)::([0-9.]+):([0-9.]+).*', - out, re.MULTILINE|re.DOTALL) + out, re.MULTILINE | re.DOTALL) if match: self.ip, self.server_ip, self.netmask = match.groups() # network configuration is required as we couldn't get it @@ -548,7 +548,7 @@ class QemuRunner: if e.errno != errno.ESRCH: raise try: - outs, errs = self.runqemu.communicate(timeout = self.runqemutime) + outs, errs = self.runqemu.communicate(timeout=self.runqemutime) if outs: self.logger.info("Output from runqemu:\n%s", outs.decode("utf-8")) if errs: -- cgit v1.2.3-54-g00ecf