($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: michael.opdenacker@bootlin.com
To: bitbake-devel@lists.openembedded.org
Cc: Michael Opdenacker <michael.opdenacker@bootlin.com>
Subject: [PATCH] prserv: remove dead code in exception handling
Date: Wed,  6 Mar 2024 18:11:44 +0100	[thread overview]
Message-ID: <20240306171144.1874798-1-michael.opdenacker@bootlin.com> (raw)

From: Michael Opdenacker <michael.opdenacker@bootlin.com>

As explained in https://docs.python.org/3/reference/compound_stmts.html#else-clause,
the code after the "else" statement won't be run as there is a "return"
in the "try" block.

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>

---

See the whole code on
https://git.openembedded.org/bitbake/tree/lib/prserv/serv.py#n38
---
 lib/prserv/serv.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/prserv/serv.py b/lib/prserv/serv.py
index 5fc8863f7..5032f7cd7 100644
--- a/lib/prserv/serv.py
+++ b/lib/prserv/serv.py
@@ -40,8 +40,6 @@ class PRServerClient(bb.asyncrpc.AsyncServerConnection):
         except:
             self.table.sync()
             raise
-        else:
-            self.table.sync_if_dirty()
 
     async def handle_get_pr(self, request):
         version = request['version']
-- 
2.34.1



             reply	other threads:[~2024-03-06 17:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06 17:11 michael.opdenacker [this message]
2024-03-06 23:31 ` [bitbake-devel] [PATCH] prserv: remove dead code in exception handling Joshua Watt
2024-03-08 15:31   ` Michael Opdenacker

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=20240306171144.1874798-1-michael.opdenacker@bootlin.com \
    --to=michael.opdenacker@bootlin.com \
    --cc=bitbake-devel@lists.openembedded.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).