From: Zac Medico Date: Sat, 18 Sep 2010 01:52:05 +0000 (-0700) Subject: Make EbuildIpcDaemon._input_handler() use a blanket exception X-Git-Tag: v2.2_rc84~25 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3399773dd5b602b33c075b43e8396f56c7ff8185;p=portage.git Make EbuildIpcDaemon._input_handler() use a blanket exception handler for pickle.loads() since that can raise practically any exception when given corrupt data. --- diff --git a/pym/_emerge/EbuildIpcDaemon.py b/pym/_emerge/EbuildIpcDaemon.py index f6bfecfbe..66d868ba2 100644 --- a/pym/_emerge/EbuildIpcDaemon.py +++ b/pym/_emerge/EbuildIpcDaemon.py @@ -36,8 +36,11 @@ class EbuildIpcDaemon(FifoIpcDaemon): try: obj = pickle.loads(buf.tostring()) - except (EnvironmentError, EOFError, ValueError, - pickle.UnpicklingError): + except SystemExit: + raise + except Exception: + # The pickle module can raise practically + # any exception when given corrupt data. pass else: cmd_key = obj[0]