Merge "Add stronger checking of backend configuration"

This commit is contained in:
Jenkins
2014-01-03 14:14:42 +00:00
committed by Gerrit Code Review

View File

@@ -26,6 +26,11 @@ class Backend(object):
"""Base class for persistence backends."""
def __init__(self, conf):
if not conf:
conf = {}
if not isinstance(conf, dict):
raise TypeError("Configuration dictionary expected not: %s"
% type(conf))
self._conf = conf
@abc.abstractmethod