diff options
author | Jose M. Guisado <jguisado@soleta.eu> | 2022-08-30 17:04:41 +0200 |
---|---|---|
committer | Jose M. Guisado <jguisado@soleta.eu> | 2022-09-14 17:12:14 +0200 |
commit | 00a95bdb61aae943c670eed6fd59185546adc777 (patch) | |
tree | 3427f62bda9fba0939db2b62741982fff24c45ee /src/utils/tiptorrent.py | |
parent | 5d799773f6cbf887dd1b236bb8f9a2c3a06d2c21 (diff) |
live: rewrite image_restore
Integrates image restore command into native ogClient code. Further
reduces the need for external Bash scripts.
After a succesful image restore, OS configuration is still using
external Bash script "osConfigure/osConfigureCustom".
Diffstat (limited to 'src/utils/tiptorrent.py')
-rw-r--r-- | src/utils/tiptorrent.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/utils/tiptorrent.py b/src/utils/tiptorrent.py index 796a665..62feb43 100644 --- a/src/utils/tiptorrent.py +++ b/src/utils/tiptorrent.py @@ -71,16 +71,13 @@ def tip_client_get(tip_addr, image_name): try: proc = subprocess.Popen(shlex.split(cmd), - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, + stdout=logfile, cwd='/opt/opengnsys/cache/opt/opengnsys/images/') - out, err = proc.communicate() + proc.communicate() except: - logging.error('Exception when running software inventory subprocess') + logging.error('Exception when running tiptorrent client GET subprocess') raise ValueError('Error: Incorrect command value') finally: - logging.debug(f'tip_client_get out: {out}') - logging.debug(f'tip_client_get err: {err}') logfile.close() if proc.returncode != 0: |