def clone_repository(user, repo, path):
try:
if user:
Repo.clone_from('https://github.com/%s/%s.git' % (user, repo), path)
else:
# repo is the gist hash then
Repo.clone_from('https://gist.github.com/%s.git' % repo, path)
except:
print 'Error cloning \'%s\'' % repo
评论列表
文章目录