On 12/09/2013 08:03 AM, Martin Kolman wrote:
Also add a few comments about what the various exceptions mean.
Signed-off-by: Martin Kolman <mkolman(a)redhat.com>
---
pyanaconda/ntp.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pyanaconda/ntp.py b/pyanaconda/ntp.py
index a42a570..f0c051b 100644
--- a/pyanaconda/ntp.py
+++ b/pyanaconda/ntp.py
@@ -61,8 +61,13 @@ def ntp_server_working(server):
client.request(server)
except ntplib.NTPException:
return False
+ # address related error
except socket.gaierror:
return False
+ # socket related error
+ # (including "Network is unreachable")
+ except socket.error:
+ return False
return True
Ack.