mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot: avoid crash when creating migration symlink
This commit is contained in:
parent
bf9ec0b7db
commit
ca4768230d
@ -216,7 +216,10 @@ class runbot_repo(models.Model):
|
||||
migration_repo_id = int(icp.get_param('runbot_migration_repo_id', default=0))
|
||||
if ln_param and migration_repo_id and self.server_files:
|
||||
scripts_dir = self.env['runbot.repo'].browse(migration_repo_id)._get_repo_name_part()
|
||||
os.symlink('/data/build/%s' % scripts_dir, self._source_path(sha, ln_param))
|
||||
try:
|
||||
os.symlink('/data/build/%s' % scripts_dir, self._source_path(sha, ln_param))
|
||||
except FileNotFoundError:
|
||||
_logger.warning('Impossible to create migration symlink')
|
||||
|
||||
# TODO get result and fallback on cleaing in case of problem
|
||||
return export_path
|
||||
|
Loading…
Reference in New Issue
Block a user