remove uncloud specific things
This commit is contained in:
parent
1ffc6f5768
commit
89244dc4ee
1 changed files with 3 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue