def _get_project_name(archive):
"""
Get the project name from the archive.
The project name is the name of the root directory in the archive.
"""
try:
contents = tar(exclude='*/*', list=True, file=archive)
return os.path.dirname(str(contents))
except ErrorReturnCode as e:
raise CommandError('Failed to list archive - %s' % e)
评论列表
文章目录