def Run(self):
try:
zip_file = self._args[0]
out_path = self._args[1]
except IndexError:
raise ActionError('Unable to determine desired paths from %s.' %
str(self._args))
try:
file_util.CreateDirectories(out_path)
except file_util.Error:
raise ActionError('Unable to create output path %s.' % out_path)
try:
zf = zipfile.ZipFile(zip_file)
zf.extractall(out_path)
except (IOError, zipfile.BadZipfile) as e:
raise ActionError('Bad zip file given as input. %s' % e)
评论列表
文章目录