diff --git a/rhn/connections.py b/rhn/connections.py
index c237fc4677..d615a8c063 100644
--- a/rhn/connections.py
+++ b/rhn/connections.py
@@ -7,7 +7,7 @@
# $Id$
-
+import sys
import base64
import SSL
import nonblocking
@@ -15,6 +15,7 @@ import httplib
import xmlrpclib
import encodings.idna
import socket
+import errno
from platform import python_version
# Import into the local namespace some httplib-related names
@@ -169,16 +170,13 @@ class HTTPSConnection(HTTPConnection):
af, socktype, proto, canonname, sa = r
try:
sock = socket.socket(af, socktype, proto)
- except socket.error, msg:
- sock = None
- continue
-
- try:
sock.connect((self.host, self.port))
sock.settimeout(self.timeout)
- except socket.error, e:
- sock.close()
- sock = None
+ except socket.error:
+ e = sys.exc_info()[1]
+ if e.errno != errno.EINTR:
+ sock.close()
+ sock = None
continue
break
diff --git a/rhnlib.spec b/rhnlib.spec
index 1b85fb24fe..8828a35524 100644
--- a/rhnlib.spec
+++ b/rhnlib.spec
@@ -5,7 +5,7 @@ Name: rhnlib
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
Version: 2.5.65
-Release: 1%{?dist}
+Release: 2%{?dist}
Group: Development/Libraries
License: GPLv2
@@ -59,6 +59,10 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitelib}/*
%changelog
+* Mon Mar 06 2017 Gennadii Altukhov <galt@redhat.com> 2.5.65-2
+- fix except in rhnlib to make it compatible with Python 2.4 (galt@redhat.com)
+- 1409577 - Reboot loop - rhn_check, rhnsd (jdostal@redhat.com)
+
* Wed Jul 17 2013 Tomas Kasparek <tkasparek@redhat.com> 2.5.65-1
- updating copyright years