* [PATCH] Import CHECKADDRINUSE from errno and drop "errno." when it is referenced. Was causing an exception.
@ 2025-04-08 17:27 bryan
2025-04-10 18:18 ` Calum Mackay
0 siblings, 1 reply; 2+ messages in thread
From: bryan @ 2025-04-08 17:27 UTC (permalink / raw)
To: calum.mackay; +Cc: linux-nfs, Bryan Schmersal
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Import CHECKADDRINUSE from errno and drop "errno." when it is referenced. Was causing an exception.
2025-04-08 17:27 [PATCH] Import CHECKADDRINUSE from errno and drop "errno." when it is referenced. Was causing an exception bryan
@ 2025-04-10 18:18 ` Calum Mackay
0 siblings, 0 replies; 2+ messages in thread
From: Calum Mackay @ 2025-04-10 18:18 UTC (permalink / raw)
To: bryan; +Cc: Calum Mackay, linux-nfs, Bryan Schmersal
On 08/04/2025 6:27 pm, bryan@schmersal.org wrote:
> From: Bryan Schmersal <bryan.schmersal@bossanova.com>
>
> ---
> rpc/rpc.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
hi Bryan, thanks very much for this.
Applied; tagged pynfs-0.4
In future, if you submit further patches, please remember to add a
Signed-off-by: line.
Also, it's normal to add a subsystem identifier to the description, e.g:
[PATCH pynfs] …
or:
[PATCH] pynfs: …
which makes it easier to keep track of things, especially on a list like
linux-nfs that deals with multiple kernel subsystems, as well as other
out-of-tree userland elements like pynfs.
I've fixed up the above for this patch.
Thanks again, much appreciated,
best wishes,
calum.
>
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-10 18:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-08 17:27 [PATCH] Import CHECKADDRINUSE from errno and drop "errno." when it is referenced. Was causing an exception bryan
2025-04-10 18:18 ` Calum Mackay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox