summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2016-07-27 15:12:09 +0200
committerJulien Danjou <julien@danjou.info>2016-09-30 17:17:47 +0200
commitadbb5bf466730803f62a25acd0e21fcbe3f82ce4 (patch)
treed4aaf6d8c292b8ccf1ada37b150e8ac3f81b2d0b
parent1ed3c26568e53490912ea9b93224343dc3b8124b (diff)
downloadtooz-adbb5bf466730803f62a25acd0e21fcbe3f82ce4.tar.gz
file: return converted voluptuous data
Voluptuous schema validation return validated/modified/converted data on schema __call__, so let's use it (even if we don't yet convert anything). Change-Id: Ie9b088fe25453bc9849b4f652278a0691c12fcc8
-rw-r--r--tooz/drivers/file.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tooz/drivers/file.py b/tooz/drivers/file.py
index cd20932..fa68e28 100644
--- a/tooz/drivers/file.py
+++ b/tooz/drivers/file.py
@@ -362,8 +362,7 @@ class FileDriver(coordination._RunWatchersMixin,
data = utils.loads(blob)
data = _convert_from_old_format(data)
schema = self._SCHEMAS[schema_key]
- schema(data)
- return data
+ return schema(data)
def _read_member_id(self, path):
with open(path, 'rb') as fh: