forked from pool/python-dns-lexicon
* Various changes, no upstream changelog - Add patch to fix network detection: * ioerror.patch - Drop merged patch: * multiple-fixes-to-test_hetzner.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dns-lexicon?expand=0&rev=17
24 lines
803 B
Diff
24 lines
803 B
Diff
From 7a65099f84987e6bbbce65ffbb937501138b77dd Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tomas.chvatal@gmail.com>
|
|
Date: Fri, 8 Mar 2019 14:44:47 +0100
|
|
Subject: [PATCH] Socket can also throw IOError
|
|
|
|
Catch for IOError if there is no network too.
|
|
---
|
|
lexicon/tests/providers/test_auto.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/lexicon/tests/providers/test_auto.py b/lexicon/tests/providers/test_auto.py
|
|
index d3cee052..f9779bb8 100644
|
|
--- a/lexicon/tests/providers/test_auto.py
|
|
+++ b/lexicon/tests/providers/test_auto.py
|
|
@@ -28,7 +28,7 @@ def _there_is_no_network():
|
|
try:
|
|
socket.create_connection(("www.google.com", 80))
|
|
return False
|
|
- except OSError:
|
|
+ except (OSError, IOError):
|
|
pass
|
|
return True
|
|
|