ce1e8f8ace3c2961542049cc529b77a7bfde173f,homeassistant/components/notify/yessssms.py,YesssSMSNotificationService,send_message,#YesssSMSNotificationService#Any#,42

Before Change


            if str(ex).startswith("YesssSMS:"):
                _LOGGER.error(str(ex))
        except RuntimeError as ex:
            if str(ex).startswith("YesssSMS:"):
                _LOGGER.error(str(ex))

After Change



    def send_message(self, message="", **kwargs):
        Send a SMS message via Yesss.at"s website.
        if self.yesss.account_is_suspended():
            // only retry to login after HASS was restarted with (hopefully)
            // new login data.
            _LOGGER.error(
                "Account is suspended, cannot send SMS. "
                "Check your login data and restart Home Assistant")
            return
        try:
            self.yesss.send(self._recipient, message)
        except self.yesss.NoRecipientError as ex:
            _LOGGER.error(
                "You need to provide a recipient for SMS notification: %s",
                ex)
        except self.yesss.EmptyMessageError as ex:
            _LOGGER.error(
                "Cannot send empty SMS message: %s", ex)
        except self.yesss.SMSSendingError as ex:
            _LOGGER.error(str(ex), exc_info=ex)
        except ConnectionError as ex:
            _LOGGER.error(
                "YesssSMS: unable to connect to yesss.at server.",
                exc_info=ex)
        except self.yesss.AccountSuspendedError as ex:
            _LOGGER.error(
                "Wrong login credentials!! Verify correct credentials and "
                "restart Home Assistant: %s", ex)
        except self.yesss.LoginError as ex:
            _LOGGER.error("Wrong login credentials: %s", ex)
        else:
            _LOGGER.info("SMS sent")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: home-assistant/home-assistant
Commit Name: ce1e8f8ace3c2961542049cc529b77a7bfde173f
Time: 2018-10-04
Author: flowolf@klienux.org
File Name: homeassistant/components/notify/yessssms.py
Class Name: YesssSMSNotificationService
Method Name: send_message


Project Name: thenetcircle/dino
Commit Name: dfae0dae92e64b05a2dd129a4ad46ab53b7aa0fa
Time: 2016-10-27
Author: oscar.eriks@gmail.com
File Name: dino/utils/__init__.py
Class Name:
Method Name: ban_duration_to_timestamp


Project Name: tensorflow/tensorboard
Commit Name: f53803df8a8f253fa80cb19ea52dc5fad6633133
Time: 2019-02-14
Author: nfelt@users.noreply.github.com
File Name: tensorboard/summary/_tf/summary/__init__.py
Class Name:
Method Name:


Project Name: home-assistant/home-assistant
Commit Name: 4831f578347977ee6c7e72b00b68ef1dceda6e18
Time: 2017-01-26
Author: pascal.vizeli@syshack.ch
File Name: homeassistant/components/media_player/sonos.py
Class Name: SonosDevice
Method Name: update