7a979e9f720fb03af107bb89ad94247d76e150df,homeassistant/components/alarm_control_panel/egardia.py,EgardiaAlarm,lookupstatusfromcode,#EgardiaAlarm#Any#,157
Before Change
if "," in val:
splitted = val.split(",")
for code in splitted:
code = str(code).strip()
if statuscode == code:
status = i.upper()
break
elif statuscode == val:
After Change
def lookupstatusfromcode(self, statuscode):
Look at the rs_codes and returns the status from the code.
status = next((
status_group.upper() for status_group, codes
in self._rs_codes.items() for code in codes
if statuscode == code), "UNKNOWN")
return status
def parsestatus(self, status):
Parse the status.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: home-assistant/home-assistant
Commit Name: 7a979e9f720fb03af107bb89ad94247d76e150df
Time: 2018-03-02
Author: jeroen_ter_heerdt@hotmail.com
File Name: homeassistant/components/alarm_control_panel/egardia.py
Class Name: EgardiaAlarm
Method Name: lookupstatusfromcode
Project Name: EpistasisLab/tpot
Commit Name: ef7e473d04352059c33af7bef48321e5dec7b3da
Time: 2015-11-13
Author: rso@randalolson.com
File Name: setup.py
Class Name:
Method Name: calculate_version
Project Name: RaRe-Technologies/gensim
Commit Name: 4ea27ba44e2ce56f06c2294d02e59031707e1ca5
Time: 2014-04-19
Author: radimrehurek@seznam.cz
File Name: gensim/matutils.py
Class Name: MmReader
Method Name: __init__