From 89244dc4ee89414db01621965e29a070512359f5 Mon Sep 17 00:00:00 2001 From: meow Date: Tue, 28 Jan 2020 15:51:31 +0500 Subject: [PATCH] remove uncloud specific things --- opennebula-vm-etcd/etcd_wrapper.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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