remove uncloud specific things

This commit is contained in:
ahmadbilalkhalid 2020-01-28 15:51:31 +05:00
parent 1ffc6f5768
commit 89244dc4ee

View file

@ -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