Commits

Jeffrey Goettsch committed c9f8788

NMA and Prowl clients will not log a warning if notify is called with no API keys set.

  • Participants
  • Parent commits f291c82

Comments (0)

Files changed (2)

File pushnotify/nma.py

             response_stream = self._post(self._urls['notify'], data)
             self._parse_response_stream(response_stream)
 
+        if not self.apikeys:
+            self.logger.warn('notify called with no users set')
+            return
+
         if split:
             while description:
                 this_desc = description[0:DESC_LIMIT]

File pushnotify/prowl.py

                 (default: None)
 
         Raises:
+            pushnotify.exceptions.ApiKeyError
             pushnotify.exceptions.FormatError
-            pushnotify.exceptions.ApiKeyError
             pushnotify.exceptions.RateLimitExceeded
             pushnotify.exceptions.ServerError
             pushnotify.exceptions.UnknownError
             response_stream = self._post(self._urls['notify'], data)
             self._parse_response_stream(response_stream)
 
+        if not self.apikeys:
+            self.logger.warn('notify called with no users set')
+            return
+
         if split:
             while description:
                 this_desc = description[0:DESC_LIMIT]