Merge pull request 'listswinfo' (#100) from listswinfo into main
ogclient/pipeline/head This commit looks good Details
ogclient/pipeline/tag This commit looks good Details

Reviewed-on: #100
pull/101/head 1.0.2
Natalia Serrano 2025-07-24 15:18:55 +02:00
commit 9bbcfa6907
3 changed files with 16 additions and 4 deletions

View File

@ -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).
## [1.0.2] - 2025-07-24
### Changed
- Write listSoftwareInfo errors in the log
## [1.0.1] - 2025-07-23
### Fixed

View File

@ -27,12 +27,18 @@ if __name__ == "__main__":
# Registro de inicio de ejecución
ogEcho (['log', 'session'], None, f'{ogGlobals.lang.MSG_INTERFACE_START} {prog} {disk} {par} {dest_file}')
listsi_out = subprocess.run ([f'{ogGlobals.OGSCRIPTS}/listSoftwareInfo', disk, par], capture_output=True, text=True).stdout
p = subprocess.run ([f'{ogGlobals.OGSCRIPTS}/listSoftwareInfo', disk, par], capture_output=True, text=True)
listsi_out = p.stdout
listsi_err = p.stderr
if listsi_out:
file = listsi_out.splitlines()[0]
else:
ogRaiseError ([], ogGlobals.OG_ERR_GENERIC, 'listSoftwareInfo failed')
sys.exit (1)
if listsi_err:
ogRaiseError ([], ogGlobals.OG_ERR_FORMAT, listsi_err)
sys.exit (1)
else:
ogRaiseError ([], ogGlobals.OG_ERR_FORMAT, 'listSoftwareInfo failed')
sys.exit (1)
shutil.copy (file, dest_file)

View File

@ -160,7 +160,7 @@ def ogGetIpAddress():
addrs = e['addr_info']
for a in addrs:
if 'inet' != a['family']: continue
addresses.append ({ 'local': a['local'], 'prefixlen': a['prefixlen'] })
addresses.append (a['local'])
if 1 != len (addresses):
raise Exception ('more than one local IP address found')