qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Markus Armbruster" <armbru@redhat.com>,
	"Joel Stanley" <joel@jms.id.au>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>,
	"Leonardo Bras" <leobras@redhat.com>,
	"Halil Pasic" <pasic@linux.ibm.com>,
	qemu-block@nongnu.org, "Eduardo Habkost" <eduardo@habkost.net>,
	"Vladimir Sementsov-Ogievskiy" <v.sementsov-og@mail.ru>,
	"Cleber Rosa" <crosa@redhat.com>,
	qemu-arm@nongnu.org, "Fabiano Rosas" <farosas@suse.de>,
	"Hanna Reitz" <hreitz@redhat.com>,
	qemu-s390x@nongnu.org,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"John Snow" <jsnow@redhat.com>, "Cédric Le Goater" <clg@kaod.org>,
	"Michael Roth" <michael.roth@amd.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Andrew Jeffery" <andrew@aj.id.au>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Beraldo Leal" <bleal@redhat.com>,
	"Eric Farman" <farman@linux.ibm.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Ani Sinha" <anisinha@redhat.com>,
	"Juan Quintela" <quintela@redhat.com>,
	"Eric Blake" <eblake@redhat.com>,
	"Vladimir Sementsov-Ogievskiy" <vsementsov@yandex-team.ru>,
	"Thomas Huth" <thuth@redhat.com>, "Kevin Wolf" <kwolf@redhat.com>,
	"Peter Xu" <peterx@redhat.com>
Subject: [PULL 1/6] python: linter changes for pylint 3.x
Date: Mon, 15 Jul 2024 13:32:36 -0400	[thread overview]
Message-ID: <20240715173241.572048-2-jsnow@redhat.com> (raw)
In-Reply-To: <20240715173241.572048-1-jsnow@redhat.com>

New bleeding edge versions, new nits to iron out. This addresses the
'check-python-tox' optional GitLab test, while 'check-python-minreqs'
saw no regressions, since it's frozen on an older version of pylint.

Fixes:
qemu/machine/machine.py:345:52: E0606: Possibly using variable 'sock' before assignment (possibly-used-before-assignment)
qemu/utils/qemu_ga_client.py:168:4: R1711: Useless return at end of function or method (useless-return)

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20240626232230.408004-2-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
---
 python/qemu/machine/machine.py      | 1 +
 python/qemu/utils/qemu_ga_client.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py
index f648f6af451..ebb58d5b68c 100644
--- a/python/qemu/machine/machine.py
+++ b/python/qemu/machine/machine.py
@@ -335,6 +335,7 @@ def binary(self) -> str:
 
     def _pre_launch(self) -> None:
         if self._qmp_set:
+            sock = None
             if self._monitor_address is None:
                 self._sock_pair = socket.socketpair()
                 os.set_inheritable(self._sock_pair[0].fileno(), True)
diff --git a/python/qemu/utils/qemu_ga_client.py b/python/qemu/utils/qemu_ga_client.py
index 9a665e6e990..cf0fcf9a8bb 100644
--- a/python/qemu/utils/qemu_ga_client.py
+++ b/python/qemu/utils/qemu_ga_client.py
@@ -174,7 +174,7 @@ def suspend(self, mode: str) -> None:
             # On error exception will raise
         except asyncio.TimeoutError:
             # On success command will timed out
-            return
+            pass
 
     def shutdown(self, mode: str = 'powerdown') -> None:
         if mode not in ['powerdown', 'halt', 'reboot']:
-- 
2.45.0



  reply	other threads:[~2024-07-15 17:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-15 17:32 [PULL 0/6] Python patches John Snow
2024-07-15 17:32 ` John Snow [this message]
2024-07-15 17:32 ` [PULL 2/6] python: Do not use pylint 3.2.4 with python 3.8 John Snow
2024-07-15 17:32 ` [PULL 3/6] iotests: Change imports for Python 3.13 John Snow
2024-07-15 17:32 ` [PULL 4/6] python: enable testing for 3.13 John Snow
2024-07-15 17:32 ` [PULL 5/6] Python: bump minimum sphinx version to 3.4.3 John Snow
2024-07-15 17:32 ` [PULL 6/6] docs: remove Sphinx 1.x compatibility code John Snow
2024-07-15 23:39 ` [PULL 0/6] Python patches Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240715173241.572048-2-jsnow@redhat.com \
    --to=jsnow@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=andrew@aj.id.au \
    --cc=anisinha@redhat.com \
    --cc=armbru@redhat.com \
    --cc=aurelien@aurel32.net \
    --cc=bleal@redhat.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=clg@kaod.org \
    --cc=crosa@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=farman@linux.ibm.com \
    --cc=farosas@suse.de \
    --cc=hreitz@redhat.com \
    --cc=joel@jms.id.au \
    --cc=kwolf@redhat.com \
    --cc=leobras@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=mst@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=thuth@redhat.com \
    --cc=v.sementsov-og@mail.ru \
    --cc=vsementsov@yandex-team.ru \
    --cc=wainersm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).