Fix unit tests for mqtt

This commit is contained in:
Oliver van Porten committed 2015-11-20 23:42:22 +01:00
1 parent 030686a978
commit 44714614ad
1 file changed
+4 -4
+4 -4
View File
@@ -142,10 +142,10 @@ class _JsonFmtParser(object):
class FmtParser(object):
""" wrapper for all supported formats """
def __init__(self, fmt):
if fmt.startswith('json:'):
self._parser = _JsonFmtParser(fmt[5:])
else:
self._parser = lambda x: x
self._parser = lambda x: x
if fmt:
if fmt.startswith('json:'):
self._parser = _JsonFmtParser(fmt[5:])
def __call__(self, payload):
return self._parser(payload)