d16bc632da35a31957ba3ac399dab4769591af17,homeassistant/components/notify/pushsafer.py,PushsaferNotificationService,send_message,#PushsaferNotificationService#Any#,49
Before Change
targets = kwargs.get(ATTR_TARGET)
if not isinstance(targets, list):
targets = [targets]
for target in targets:
if target is not None:
data["device"] = target
try:
self.pushsafer.send_message(message, data["title"], "", "",
"", "", "", "",
"0", "", "", "")
except ValueError as val_err:
_LOGGER.error(str(val_err))
After Change
payload = {"k": self._private_key, "t": title, "m": message}
response = requests.get(_RESOURCE, params=payload,
timeout=DEFAULT_TIMEOUT)
if response.status_code != 200:
_LOGGER.error("Not possible to send notification")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: home-assistant/home-assistant
Commit Name: d16bc632da35a31957ba3ac399dab4769591af17
Time: 2017-03-07
Author: appzer@users.noreply.github.com
File Name: homeassistant/components/notify/pushsafer.py
Class Name: PushsaferNotificationService
Method Name: send_message
Project Name: AlexsLemonade/refinebio
Commit Name: 70377c624fdc514cd5897985c67c922cba613c1d
Time: 2018-08-27
Author: kurt.wheeler91@gmail.com
File Name: foreman/data_refinery_foreman/surveyor/transcriptome_index.py
Class Name: TranscriptomeIndexSurveyor
Method Name: discover_species
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 42fbf7857efc6e2153fc51303cc5a2f306ee9c01
Time: 2019-03-21
Author: dlott@google.com
File Name: perfkitbenchmarker/linux_benchmarks/stress_ng_benchmark.py
Class Name:
Method Name: _ParseStressngResult