Compare commits

..

No commits in common. "wip" and "master" have entirely different histories.
wip ... master

1 changed files with 2 additions and 3 deletions

View File

@ -5,7 +5,6 @@ import copy
from collections import namedtuple
from dataclasses import dataclass
from typing import Union
PseudoEtcdMeta = namedtuple("PseudoEtcdMeta", ["key"])
@ -24,14 +23,14 @@ class EtcdEntry:
print(f"Json Error: {e}, value={value}")
key: str
value: Union[str, dict]
value: str
class Etcd3Wrapper(object):
def __init__(self, *args, **kwargs):
self.client = etcd3.client(*args, **kwargs)
def get(self, *args, value_in_json=False, **kwargs) -> Union[EtcdEntry, None]:
def get(self, *args, value_in_json=False, **kwargs):
_value, _key = self.client.get(*args, **kwargs)
if _key is None or _value is None:
return None