client/rhel/rhn-client-tools/src/up2date_client/rhncli.py | 6 ++++++
client/rhel/rhnlib/rhn/transports.py | 4 ----
2 files changed, 6 insertions(+), 4 deletions(-)
New commits:
commit 94a5ae16d12e126fc26d6646c06400c9de6a9ec6
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed May 26 11:38:38 2010 +0200
595837 - write nice error in case of "connection reset by peer" and xmlrpc
protocol error
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhncli.py
b/client/rhel/rhn-client-tools/src/up2date_client/rhncli.py
index 0423274..186fedb 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhncli.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhncli.py
@@ -91,6 +91,9 @@ class RhnCli(object):
sys.stderr.write(_("A common cause of this error is the system time
being incorrect. " \
"Verify that the time on this system is
correct.\n"))
sys.exit(1)
+ except SSL.SysCallError, socket.error:
+ sys.stderr.write("OpenSSL.SSL.SysCallError: %s\n" % str(e)
+ sys.exit(2))
except crypto.Error, e:
sys.stderr.write(_("There was a SSL crypto error: %s\n") % e)
except SystemExit, e:
@@ -101,6 +104,9 @@ class RhnCli(object):
except up2dateErrors.RpmError, e:
sys.stderr.write("%s\n" % e)
sys.exit(1)
+ except xmlrpclib.ProtocolError, e:
+ sys.stderr.write("XMLRPC ProtocolError: %s\n" % str(e)
+ sys.exit(3))
def initialize(self):
(self.options, self.args) = self.optparser.parse_args()
diff --git a/client/rhel/rhnlib/rhn/transports.py b/client/rhel/rhnlib/rhn/transports.py
index 747b5fc..3e994ea 100644
--- a/client/rhel/rhnlib/rhn/transports.py
+++ b/client/rhel/rhnlib/rhn/transports.py
@@ -164,10 +164,6 @@ class Transport(xmlrpclib.Transport):
for h in ['Content-Length', 'Host']:
req.clear_header(h)
- # XXX: should try-catch ProtocolError here. But I am not sure
- # what to do with it if I get it, so for now letting it slip
- # through to the next level is sortof working.
- # Must be fixed before ship, though. --gafton
headers, fd = req.send_http(host, handler)
if self.verbose:
Show replies by date