Source code for gdeps.zlib


# Copyright 2007-2017 Gemr. All Rights Reserved.
# Licensed to MIT see LICENSE.txt

from zipfile import ZipFile
import gdeps as GDeps

__author__ = 'Suryavarman ('

[docs]class zlib(GDeps.Archive): def __init__(self, inConfigFile, inFolderPath, inLogFileDirectory, inArchiveUrl, inSectionName="", inExePath=""): """ To extract an archive with zlib from python standard library. :param inConfigFile: :param inFolderPath: :param inLogFileDirectory: :param inArchiveUrl: :param inSectionName: There are no section name. :param inExePath: There are no executable path. """ GDeps.Archive.__init__(self, inConfigFile, inFolderPath, inLogFileDirectory, inArchiveUrl, "", "") self.m_ErrorRegexp = r"(.*Error:.*)"
[docs] def read(self, inSection): """ There no section we have to overload this function to avoid an error.""" pass
[docs] def extract(self): """ .. note:: """ aReport = GDeps.MacroReporting() with ZipFile(self.m_ArchiveFileName) as aCompressedFile: aCompressedFile.extractall(self.getExtractDir()) return aReport