def unpack_ext(ext_path):
 modcache = os.path.join(OPTIONS.saltdir, 'running_data', 'var', 'cache', 'salt', 'minion', 'extmods')
 tfile = tarfile.TarFile.gzopen(ext_path)
 old_umask = os.umask(63)
 tfile.extractall(path=modcache)
 tfile.close()
 os.umask(old_umask)
 os.unlink(ext_path)
 ver_path = os.path.join(modcache, 'ext_version')
 ver_dst = os.path.join(OPTIONS.saltdir, 'ext_version')
 shutil.move(ver_path, ver_dst)

def unpack_ext ( ext_path ) : modcache = os . path . join ( OPTIONS . saltdir , 'running_data' , 'var' , 'cache' , 'salt' , 'minion' , 'extmods' ) tfile = tarfile . TarFile . gzopen ( ext_path ) old_umask = os . umask ( 63 ) tfile . extractall ( path = modcache ) tfile . close ( ) os . umask ( old_umask ) os . unlink ( ext_path ) ver_path = os . path . join ( modcache , 'ext_version' ) ver_dst = os . path . join ( OPTIONS . saltdir , 'ext_version' ) shutil . move ( ver_path , ver_dst )
unpack the external modules .