live: fix ogChangeRepo invocation

Add missing samba credentials parameter in ogChangeRepo invocation.

Credentials are loaded from ogClient config file.

Any production deployment should use its own samba user and password.
ogChangeRepo fails when using default samba credentials in a production
environment.

Fixes: a1edbe904b ("legacy: rewrite ogChangeRepo")
Fixes: 3703fd6063 ("live: support native unicast cache image restore")
more_events
Jose M. Guisado 2023-03-27 14:37:25 +02:00
parent c0e14e0c95
commit 2172f00cde
1 changed files with 1 additions and 1 deletions

View File

@ -138,7 +138,7 @@ class OgLiveOperations:
raise ValueError(f'Error: Cannot copy image {image_name} to cache')
def _restore_image_unicast(self, repo, name, devpath, cache=False):
if ogChangeRepo(repo).returncode != 0:
if ogChangeRepo(repo, smb_user=self._smb_user, smb_pass=self._smb_pass).returncode != 0:
self._restartBrowser(self._url)
logging.error('ogChangeRepo could not change repository to %s', repo)
raise ValueError(f'Error: Cannot change repository to {repo}')