def do_clone(self):
print "[+] Cloning '{}'".format(self['name'])
try:
if self['private']:
Repo.clone_from(self['address'], self.path(), env=dict(GIT_SSH_COMMAND=self['ssh_cmd']))
else:
Repo.clone_from(self['address'], self.path())
dispatcher.update_modules(self)
self.update_value('status', 'active')
except Exception, e:
self['status'] = 'error'
self['error_msg'] = 'Could not clone repository, probably due to authentication issues.\n{}'.format(e)
self.save()
internals = Internals.get(name="updates")
internals.update_value("last_update", time())
评论列表
文章目录