

def MakeZip(self, input_dir, output_file):
    'Creates a ZIP archive of the files in the input directory.\n\n    Args:\n      input_dir: the name of the input directory.\n      output_file: the name of the output ZIP archive without extension.\n    '
    logging.info('Generating zip template file at %s', output_file)
    zf = zipfile.ZipFile(output_file, 'w')
    oldwd = os.getcwd()
    os.chdir(input_dir)
    for path in ['debian', 'rpmbuild']:
        for (root, _, files) in os.walk(path):
            for f in files:
                zf.write(os.path.join(root, f))
    zf.close()
    os.chdir(_)

dataset/ETHPy150Open google/grr/grr/lib/builders/linux.py LinuxClientBuilder.MakeZip/VarMisuse@116/229 `oldwd`->`_`