refs #1914 fix a couple of bugs
parent
f785143b73
commit
e20bd46edb
|
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.6.1] - 2025-04-15
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed capturing of partclone output and management of return value
|
||||
|
||||
## [0.6.0] - 2025-04-15
|
||||
|
||||
### Changed
|
||||
|
|
|
@ -512,6 +512,8 @@ def ogRestoreImage (repo, imgpath, disk, par):
|
|||
rc = None
|
||||
try:
|
||||
p = subprocess.run (program, shell=True, capture_output=True, text=True)
|
||||
print (p.stdout)
|
||||
print (p.stderr)
|
||||
rc = p.returncode
|
||||
if not rc:
|
||||
SystemLib.ogRaiseError ([], ogGlobalsOG_ERR_IMAGE, f'{imgfile}, {disk}, {par}')
|
||||
|
|
|
@ -145,6 +145,10 @@ def main (repo, imgname, disk, par, proto='UNICAST', protoopt=''):
|
|||
SystemLib.ogEcho (['log', 'session'], None, f'[55] {ogGlobals.lang.MSG_HELP_ogRestoreImage}: restoreImage {params}')
|
||||
retval = subprocess.run (['restoreImage.py'] + params).returncode
|
||||
|
||||
## turn shell's success into python success (without ending up with True or False)
|
||||
if retval: retval = 0
|
||||
else: retval = 1
|
||||
|
||||
# Mostrar resultados.
|
||||
resumerestoreimage = subprocess.run (['grep', '--max-count', '1', 'Total Time:', ogGlobals.OGLOGCOMMAND], capture_output=True, text=True).stdout
|
||||
SystemLib.ogEcho (['log', 'session'], None, f' [ ] {resumerestoreimage} ')
|
||||
|
|
Loading…
Reference in New Issue