refs #2530 show listSoftwareInfo errors in the log
parent
e2500eb491
commit
b402ae6973
|
@ -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)
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue