to handle ValueError

other way can be:

        except Exception as err:
            if isinstance(err, ValueError):
                logging.error("unable to load config:{}".format(err.message))
            elif err.rsp.find('.//ok') is None:
                rpc_msg = err.rsp.findtext('.//error-message')
                logging.error("unable to load config:{}".format(rpc_msg))
            raise err