[Git][NTPsec/ntpsec][master] socket.error derives from EnvironmentError. Tweak accordingly.

Eric S. Raymond gitlab at mg.gitlab.com
Fri Dec 2 02:46:23 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
d054d606 by Eric S. Raymond at 2016-12-01T21:46:09-05:00
socket.error derives from EnvironmentError.  Tweak accordingly.

- - - - -


1 changed file:

- pylib/packet.py


Changes:

=====================================
pylib/packet.py
=====================================
--- a/pylib/packet.py
+++ b/pylib/packet.py
@@ -794,12 +794,12 @@ class ControlSession:
             self.sock = socket.socket(family, socktype, protocol)
         except socket.error as e:
             raise ControlException("Error opening %s: %s [%d]" \
-                                   % (hname, e.msg, e.errno))
+                                   % (hname, e.strerror, e.errno))
         try:
             self.sock.connect(sockaddr)
         except socket.error as e:
             raise ControlException("Error connecting to %s: %s [%d]" \
-                                   % (hname, e.msg, e.errno))
+                                   % (hname, e.strerror, e.errno))
         return True
 
     def password(self):



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/d054d6063021b7f784b4ea0430faa021b3d2a3be
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161202/ac3aa504/attachment.html>


More information about the vc mailing list