Merge pull request 'fix-ucast-mcast' (#47) from fix-ucast-mcast into main
ogclient/pipeline/head There was a failure building this commit Details
ogclient/pipeline/tag There was a failure building this commit Details

Reviewed-on: #47
pull/48/head 0.13.5
Natalia Serrano 2025-05-30 13:33:16 +02:00
commit def329436d
2 changed files with 17 additions and 3 deletions

View File

@ -5,6 +5,13 @@ 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.13.5] - 2025-05-30
### Fixed
- Return a true value from the unicast/multicast methods
- Fully qualify a method call
## [0.13.4] - 2025-05-28
### Changed

View File

@ -134,6 +134,7 @@ def ogUcastSendPartition (disk, par, sess, tool, level):
except subprocess.CalledProcessError:
SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_UCASTSENDPARTITION, ' ')
return None
return True
@ -165,6 +166,7 @@ def ogUcastReceiverPartition (disk, par, sess, tool, level):
except subprocess.CalledProcessError:
SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_UCASTRECEIVERPARTITION, ' ')
return None
return True
@ -235,6 +237,7 @@ def ogUcastSendFile (disk=None, par=None, container=None, file=None, sess=None):
except subprocess.CalledProcessError:
SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_UCASTSENDFILE, ' ')
return None
return True
def _clientip():
ipas = subprocess.run (['ip', '-json', 'address', 'show', 'up'], capture_output=True, text=True).stdout
@ -493,6 +496,7 @@ def ogMcastSendFile (disk=None, par=None, container=None, file=None, sess=None):
except subprocess.CalledProcessError:
SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_MCASTSENDFILE, ' ')
return None
return True
@ -554,6 +558,7 @@ def ogMcastReceiverFile (disk=None, par=None, container=None, file=None, sess=No
except subprocess.CalledProcessError:
SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_MCASTRECEIVERFILE, targetfile)
return None
return True
#/**
@ -586,6 +591,7 @@ def ogMcastSendPartition (disk, par, sess, tool, compressor):
except subprocess.CalledProcessError:
SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_MCASTSENDPARTITION, ' ')
return None
return True
#/**
# ogMcastReceiverPartition
@ -611,6 +617,7 @@ def ogMcastReceiverPartition (disk, par, sess, tool, compressor):
except subprocess.CalledProcessError:
SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_MCASTRECEIVERPARTITION, ' ') ## original code has OG_ERR_MCASTSENDPARTITION
return None
return True
@ -858,9 +865,9 @@ def ogUpdateCacheIsNecesary (repo, file, proto):
filetarget = FileLib.ogGetPath (src='CACHE', file=file)
if not filetarget:
# borramos el fichero bf del torrent, en el caso de que se hubiese quedado de algun proceso fallido
if FileLib.ogGetPath (src='CACHE', file=f'/{file}.torrent.bf'): ogDeleteFile (container='CACHE', file=f'{file}.torrent.bf')
if FileLib.ogGetPath (src='CACHE', file=f'/{file}.sum'): ogDeleteFile (container='CACHE', file=f'{file}.sum')
if FileLib.ogGetPath (src='CACHE', file=f'/{file}.full.sum'): ogDeleteFile (container='CACHE', file=f'{file}.full.sum')
if FileLib.ogGetPath (src='CACHE', file=f'/{file}.torrent.bf'): FileLib.ogDeleteFile (container='CACHE', file=f'{file}.torrent.bf')
if FileLib.ogGetPath (src='CACHE', file=f'/{file}.sum'): FileLib.ogDeleteFile (container='CACHE', file=f'{file}.sum')
if FileLib.ogGetPath (src='CACHE', file=f'/{file}.full.sum'): FileLib.ogDeleteFile (container='CACHE', file=f'{file}.full.sum')
print ('TRUE(0), es necesario actualizar. Paso 1, la cache no contiene esa imagen ')
return True