Loading src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +13 −2 Original line number Diff line number Diff line Loading @@ -86,18 +86,29 @@ class InterfaceHandler(_Handler): json_data = json_data['openconfig-interfaces:interface'][0] str_data = json.dumps(json_data) is_error = False LOGGER.warning('Releasing...') while not objects_to_free.empty(): 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')) )) try: LOGGER.warning('Freeing...') obj.free() LOGGER.warning('Free done') except: LOGGER.exception('Something went wrong...') is_error = True break except queue.Empty: LOGGER.warning('No more objects...') continue if not is_error: LOGGER.warning('Release done') return str_path, str_data Loading Loading
src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +13 −2 Original line number Diff line number Diff line Loading @@ -86,18 +86,29 @@ class InterfaceHandler(_Handler): json_data = json_data['openconfig-interfaces:interface'][0] str_data = json.dumps(json_data) is_error = False LOGGER.warning('Releasing...') while not objects_to_free.empty(): 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')) )) try: LOGGER.warning('Freeing...') obj.free() LOGGER.warning('Free done') except: LOGGER.exception('Something went wrong...') is_error = True break except queue.Empty: LOGGER.warning('No more objects...') continue if not is_error: LOGGER.warning('Release done') return str_path, str_data Loading