diff --git a/opennebula-vm-etcd/etcd_wrapper.py b/opennebula-vm-etcd/etcd_wrapper.py index 9624677..f448dcf 100644 --- a/opennebula-vm-etcd/etcd_wrapper.py +++ b/opennebula-vm-etcd/etcd_wrapper.py @@ -1,11 +1,9 @@ import etcd3 import json +import logging from functools import wraps -from uncloud import UncloudException -from uncloud.common import logger - class EtcdEntry: def __init__(self, meta_or_key, value, value_in_json=True): @@ -27,11 +25,11 @@ def readable_errors(func): try: return func(*args, **kwargs) except etcd3.exceptions.ConnectionFailedError: - raise UncloudException('Cannot connect to etcd: is etcd running as configured in uncloud.conf?') + raise etcd3.exceptions.ConnectionFailedError('Cannot connect to etcd: is etcd running as configured?') except etcd3.exceptions.ConnectionTimeoutError as err: raise etcd3.exceptions.ConnectionTimeoutError('etcd connection timeout.') from err except Exception as err: - logger.exception('Some etcd error occured. See syslog for details.', err) + logging.exception('Some etcd error occured. See syslog for details.', err) return wrapper