9d9ccbd590bfef01cdc401e65d89cb41d5a10128,pysos/utils.py,WorkflowDict,_check_readonly,#WorkflowDict#Any#Any#,231
Before Change
cmp_res = self.__cmp_values__(value, self._dict[key])
if not cmp_res:
if env.run_mode == "interactive":
if cmp_res is False:
env.logger.warning("Readonly variable {} is changed from {} to {}"
.format(key, self._dict[key], value))
self._dict[key] = value
else:
raise RuntimeError("Variable {} is readonly and cannot be changed from {} to {}."
.format(key, self._dict[key], value))
After Change
if not cmp_res:
if env.run_mode != "interactive":
raise RuntimeError("Variable {} is readonly and cannot be changed from {} to {}."
.format(key, short_repr(self._dict[key]), short_repr(self._readonly_vars[key]) ))
cmp_res = self.__cmp_values__(value, self._dict[key])
if not cmp_res:
if env.run_mode != "interactive":
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: vatlab/SoS
Commit Name: 9d9ccbd590bfef01cdc401e65d89cb41d5a10128
Time: 2016-10-13
Author: ben.bog@gmail.com
File Name: pysos/utils.py
Class Name: WorkflowDict
Method Name: _check_readonly
Project Name: vatlab/SoS
Commit Name: 9d9ccbd590bfef01cdc401e65d89cb41d5a10128
Time: 2016-10-13
Author: ben.bog@gmail.com
File Name: pysos/utils.py
Class Name: WorkflowDict
Method Name: check_readonly_vars
Project Name: vatlab/SoS
Commit Name: fedaa64b5cdcdc483ce072220e9538f658b66ad4
Time: 2017-02-14
Author: ben.bog@gmail.com
File Name: sos/target.py
Class Name: RuntimeInfo
Method Name: write