Saturday April 20, 2024
Latest Blog Entries
Centos 7 pyzor emails on no internet connection
If you run your dev box and there is no internet connection you will get loads of
[abrt] pyzor: client.py:72:send:gaierror: [Errno -2] Name or service not known
emails. This can go into a email loop and freeze your system.
To stop this you need to modify the /usr/lib/python2.7/site-packages/pyzor/client.py script to handle the error :
Change line 815: except (CommError, KeyError, ValueError) to (CommError, socket.error, KeyError, ValueError) ie add the socket.error catch.
[abrt] pyzor: client.py:72:send:gaierror: [Errno -2] Name or service not known
emails. This can go into a email loop and freeze your system.
To stop this you need to modify the /usr/lib/python2.7/site-packages/pyzor/client.py script to handle the error :
def run(self, server, varargs, kwargs=None):
if kwargs is None:
kwargs = {}
message = "%s\t" % str(server)
response = None
try:
response = apply(self.routine, varargs, kwargs)
self.handle_response(response, message)
- except (CommError, KeyError, ValueError), e:
+ except (CommError, socket.error, KeyError, ValueError), e:
sys.stderr.write(message + ("%s: %s\n"
% (e.__class__.__name__, e)))
self.all_ok = False
Change line 815: except (CommError, KeyError, ValueError) to (CommError, socket.error, KeyError, ValueError) ie add the socket.error catch.
Category :
Technology
Published :
Sep 18 2018, 12:15:47 PM