def catch_epipe(fn):
    def ret(self, *args):
        try:
            return fn(self, *args)
        except socket.error, e:
            try:
                err_num = e.errno
            except __HOLE__:
                # Before Python 2.6, exception can be a pair.
                err_num, errstr = e
            except:
                raise
            if err_num != errno.EPIPE:
                raise
    return ret
dataset/ETHPy150Open arlolra/flashproxy/flashproxy/proc.py/catch_epipe