13cb16b9edbb868505c41401dc951a8c8accb396,services/core/MasterDriverAgent/master_driver/interfaces/ecobee.py,Interface,_set_point,#Interface#Any#Any#,378

Before Change


        if register.read_only:
            raise IOError("Trying to write to a point configured read only: {}".format(point_name))
        if register.register_type not in ["setting", "hold", "vacation", "programs"]:
            raise RuntimeError("Register {} type {} does not support set_point".format(register.point_name,
                                                                                       register.register_type))
        try:
            if register.register_type == "setting" or register.register_type == "hold":
                register.set_state(value)

After Change


        register = self.get_register_by_name(point_name)
        if register.read_only:
            raise IOError("Trying to write to a point configured read only: {}".format(point_name))
        if register.register_type == "status":
            raise RuntimeError("Status register does not support set_point")
        try:
            if register.register_type == "setting" or register.register_type == "hold":
                register.set_state(value)
            elif register.register_type in ["vacation", "programs"]:
                register.set_state(value, **kwargs)
        except (RemoteError, ConnectionError) as err:
            _log.error("Error setting Ecobee point: {}. Refreshing tokens and sending again".format(err))
            self.authorization_stage = "REFRESH_TOKENS"
            self.refresh_tokens()
            if register.register_type == "setting" or register.register_type == "hold":
                register.set_state(value)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: VOLTTRON/volttron
Commit Name: 13cb16b9edbb868505c41401dc951a8c8accb396
Time: 2020-06-22
Author: james.larson@pnnl.gov
File Name: services/core/MasterDriverAgent/master_driver/interfaces/ecobee.py
Class Name: Interface
Method Name: _set_point


Project Name: pantsbuild/pants
Commit Name: 98c86e0dcf65a9224b726b9b67d41e5f1ce0c253
Time: 2015-06-24
Author: stuhood@gmail.com
File Name: src/python/pants/backend/jvm/tasks/jvm_compile/execution_graph.py
Class Name: ExecutionGraph
Method Name: execute


Project Name: deeptools/HiCExplorer
Commit Name: ce7fd2a55036beb5081160af33679d8913ec08e5
Time: 2018-07-26
Author: wolffj@informatik.uni-freiburg.de
File Name: hicexplorer/hicPCA.py
Class Name:
Method Name: main


Project Name: VOLTTRON/volttron
Commit Name: 694383ee05139068146f021d19f80143f98011f6
Time: 2020-06-01
Author: james.larson@pnnl.gov
File Name: services/core/MasterDriverAgent/master_driver/interfaces/ecobee.py
Class Name: Interface
Method Name: _set_point