diff options
author | Jose M. Guisado <jguisado@soleta.eu> | 2023-03-01 10:57:53 +0100 |
---|---|---|
committer | Jose M. Guisado <jguisado@soleta.eu> | 2023-03-02 09:33:33 +0100 |
commit | a1edbe904b3019ec77b54fdd48c01183f4c73483 (patch) | |
tree | 7d2280c13a1d9df4e0e97c6c61acbd504f523d56 /src/live/ogOperations.py | |
parent | 1858950af194ef73d3ee589ae7104f7d3def9f38 (diff) |
legacy: rewrite ogChangeRepo
Drop ogChangeRepo Bash script in favor of a native Python
approach. Use only necessary subprocess calls instead of bringing
all the logic of this function into a Bash script black box.
ogChangeRepo unmounts the current OpenGnsys image samba folder
(/opt/opengnsys/images) and mounts (connects to) a new directory using
the new provided ip address. Keeping access mode from previous mount.
If anything goes wrong when mounting the new directory, it will fallback
to mounting the previous directory.
If no previous OpenGnsys image samba directory is detected, this
functions tries to mount the new directory anyway. In this case,
it will raise CalledProcessError if something goes wrong.
Diffstat (limited to 'src/live/ogOperations.py')
-rw-r--r-- | src/live/ogOperations.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index 6f52a5a..cb8957d 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -401,7 +401,7 @@ class OgLiveOperations: self._ogbrowser_clear_logs() self._restartBrowser(self._url_log) - 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}') |