From: bryan@schmersal.org
To: calum.mackay@oracle.com
Cc: linux-nfs@vger.kernel.org,
Bryan Schmersal <bryan.schmersal@bossanova.com>
Subject: [PATCH] Import CHECKADDRINUSE from errno and drop "errno." when it is referenced. Was causing an exception.
Date: Tue, 8 Apr 2025 10:27:22 -0700 [thread overview]
Message-ID: <20250408172722.377963-1-bryan@schmersal.org> (raw)
From: Bryan Schmersal <bryan.schmersal@bossanova.com>
---
rpc/rpc.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rpc/rpc.py b/rpc/rpc.py
index 124e97a..84088f6 100644
--- a/rpc/rpc.py
+++ b/rpc/rpc.py
@@ -6,7 +6,7 @@ import struct
import threading
import logging
from collections import deque as Deque
-from errno import EINPROGRESS, EWOULDBLOCK
+from errno import EINPROGRESS, EWOULDBLOCK, EADDRINUSE
from . import rpc_pack
from .rpc_const import *
@@ -846,7 +846,7 @@ class ConnectionHandler(object):
s.bind(('', using))
return
except OSError as why:
- if why.errno == errno.EADDRINUSE:
+ if why.errno == EADDRINUSE:
using += 1
if port < 1024 <= using:
# If we ask for a secure port, make sure we don't
--
2.34.1
next reply other threads:[~2025-04-08 17:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 17:27 bryan [this message]
2025-04-10 18:18 ` [PATCH] Import CHECKADDRINUSE from errno and drop "errno." when it is referenced. Was causing an exception Calum Mackay
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=20250408172722.377963-1-bryan@schmersal.org \
--to=bryan@schmersal.org \
--cc=bryan.schmersal@bossanova.com \
--cc=calum.mackay@oracle.com \
--cc=linux-nfs@vger.kernel.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