Skip to content
Snippets Groups Projects
Commit 56449dc0 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Device - gNMI OpenConfig Driver:

- Refining code
parent 75078625
No related branches found
No related tags found
1 merge request!299Resolve "(CTTC) Fix CI/CD pipeline end-to-end tests not passing"
......@@ -92,12 +92,34 @@ class InterfaceHandler(_Handler):
LOGGER.warning('Getting...')
try:
obj = objects_to_free.get_nowait()
LOGGER.warning('Releasing: {:s}'.format(str(obj)))
if obj is None: continue
LOGGER.warning('Releasing: {:s} => {:s}'.format(
str(obj.path()), str(obj.print_mem('json'))
))
if obj is None:
LOGGER.warning('Item is None')
continue
try:
type_obj = type(obj)
LOGGER.warning('Releasing[type]: {:s}'.format(str(type_obj)))
except:
LOGGER.exception('Releasing[type]: <failed>')
try:
str_obj = str(obj)
if str_obj is not None:
LOGGER.warning('Releasing[str]: {:s}'.format(str_obj))
except:
LOGGER.exception('Releasing[str]: <failed>')
try:
repr_obj = repr(obj)
if repr_obj is not None:
LOGGER.warning('Releasing[repr]: {:s}'.format(str(repr_obj)))
except:
LOGGER.exception('Releasing[repr]: <failed>')
try:
LOGGER.warning('Releasing: {:s} => {:s}'.format(
str(obj.path()), str(obj.print_mem('json'))
))
LOGGER.warning('Freeing...')
obj.free()
LOGGER.warning('Free done')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment