summaryrefslogtreecommitdiff
path: root/kvmd/network.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2024-09-18 04:37:43 +0300
committerMaxim Devaev <[email protected]>2024-09-18 04:37:43 +0300
commit7a53f1445619fc471c2823e7081de8b6039b938e (patch)
tree961dd0072cc976504fe4570743d801c79512e9a6 /kvmd/network.py
parent45270a09d7b5076bac96887a1e36d752882e3adf (diff)
refactoring
Diffstat (limited to 'kvmd/network.py')
-rw-r--r--kvmd/network.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/kvmd/network.py b/kvmd/network.py
index 22721dd5..fcf67117 100644
--- a/kvmd/network.py
+++ b/kvmd/network.py
@@ -34,10 +34,10 @@ def is_ipv6_enabled() -> bool:
with socket.socket(socket.AF_INET6, socket.SOCK_STREAM) as sock:
sock.bind(("::1", 0))
return True
- except OSError as err:
- if err.errno in [errno.EADDRNOTAVAIL, errno.EAFNOSUPPORT]:
+ except OSError as ex:
+ if ex.errno in [errno.EADDRNOTAVAIL, errno.EAFNOSUPPORT]:
return False
- if err.errno == errno.EADDRINUSE:
+ if ex.errno == errno.EADDRINUSE:
return True
raise