e57e91a650fe62f1033da5aa66ff114a67cf69e9,loudml/loudml/storage.py,Storage,load_model_hooks,#Storage#Any#,73

Before Change


        for hook_name in self.list_model_hooks(model_name):
            hook_data = self.get_model_hook(model_name, hook_name)
            hook_type = hook_data.get("type")
            hook_cls = load_entry_point("loudml.hooks", hook_type)
            if hook_cls is None:
                logging.error("unknown hook type "%s" for hook "%s/%s"",
                              hook_type, model_name, hook_name)
                continue

            hook = hook_cls(hook_name, hook_data.get("config"))
            hooks.append(hook)

        return hooks

After Change


            except loudml.LoudMLException as exn:
                logging.error("cannot load hook "%s/%s": %s",
                              model_name, hook_name, str(exn))
                continue

            hooks.append(hook)

        return hooks
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: regel/loudml
Commit Name: e57e91a650fe62f1033da5aa66ff114a67cf69e9
Time: 2018-05-18
Author: vianney@redmintnetwork.fr
File Name: loudml/loudml/storage.py
Class Name: Storage
Method Name: load_model_hooks


Project Name: home-assistant/home-assistant
Commit Name: 68c1dd7cd47c516df765a1742a62abca5c3d5f83
Time: 2015-09-14
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/automation/__init__.py
Class Name:
Method Name: _process_if


Project Name: home-assistant/home-assistant
Commit Name: 68c1dd7cd47c516df765a1742a62abca5c3d5f83
Time: 2015-09-14
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/automation/__init__.py
Class Name:
Method Name: setup