Skip to content

Commit b9b4489

Browse files
driver/qemudriver: turn private _cmd member into local variable
Now that the QEMU invocation is not only prepared, but also started in on_activate(), there is no need to keep the command around. Turn it into a local variable instead. Signed-off-by: Bastian Krause <bst@pengutronix.de>
1 parent 08c1fd5 commit b9b4489

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

labgrid/driver/qemudriver.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -224,19 +224,19 @@ def on_activate(self):
224224
self._socket.bind(sockpath)
225225
self._socket.listen(0)
226226

227-
self._cmd = self.get_qemu_base_args()
227+
qemu_cmd = self.get_qemu_base_args()
228228

229-
self._cmd.append("-S")
230-
self._cmd.append("-qmp")
231-
self._cmd.append("stdio")
229+
qemu_cmd.append("-S")
230+
qemu_cmd.append("-qmp")
231+
qemu_cmd.append("stdio")
232232

233-
self._cmd.append("-chardev")
234-
self._cmd.append(f"socket,id=serialsocket,path={sockpath}")
235-
self._cmd.append("-serial")
236-
self._cmd.append("chardev:serialsocket")
233+
qemu_cmd.append("-chardev")
234+
qemu_cmd.append(f"socket,id=serialsocket,path={sockpath}")
235+
qemu_cmd.append("-serial")
236+
qemu_cmd.append("chardev:serialsocket")
237237

238-
self.logger.debug("Starting with: %s", self._cmd)
239-
self._child = subprocess.Popen(self._cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
238+
self.logger.debug("Starting with: %s", qemu_cmd)
239+
self._child = subprocess.Popen(qemu_cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
240240

241241
# prepare for timeout handing
242242
self._clientsocket, address = self._socket.accept()

0 commit comments

Comments
 (0)