diff --git a/ee/core/extract.py b/ee/core/extract.py new file mode 100644 index 00000000..af2d001c --- /dev/null +++ b/ee/core/extract.py @@ -0,0 +1,15 @@ +"""EasyEngine extarct core classes.""" + + +class EEExtract(): + """Method to extract from tar.gz file""" + + def extract(file, path): + try: + tar = tarfile.open(file) + tar.extractall(path=path) + tar.close() + return True + except tarfile.TarError as e: + print("Unable to extract file "+file) + return False