Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def notifier_factory(self, notifier_conf):
try:
key, value = next(iter(notifier_conf.items()))
except AttributeError:
key, value = notifier_conf, None
return create_notifier(key, conf=self.conf, value=value)