'Save responses to pickle files.'

def _SaveResponses(self, responses):

    if responses:
        fd = None
        try:
            (fdint, fname) = tempfile.mkstemp(prefix='responses-', dir=self.args.save_to)
            fd = os.fdopen(fdint, 'wb')
            pickle.dump(responses, fd)
            self.Log('Wrote    %d    responses    to    %s', len(responses), fname)
        finally:
            if fd:
                fd.close()
