1
0
Fork 0

units.unit: remove unnecessary asserts

This commit is contained in:
Jan Vcelak 2012-10-25 11:35:25 +02:00
parent fc87b96744
commit 0575881354

View file

@ -12,10 +12,6 @@ class Unit(object):
__slots__ = ["_name", "_plugin", "_plugin_repository", "_monitor_repository"]
def __init__(self, plugin_repository, monitor_repository, name, plugin_name, config):
assert type(name) is str
assert type(plugin_name) is str
assert config is None or type(config) is dict
self._plugin_repository = plugin_repository
self._monitor_repository = monitor_repository
self._name = name
@ -40,7 +36,6 @@ class Unit(object):
return (None, {})
devices = None
assert type(config) is dict
if "devices" in config:
devices = config["devices"]
if devices and len(devices) == 0: