mirror of
https://github.com/caronc/apprise.git
synced 2025-01-19 12:28:43 +01:00
general code enhancements/nomenclature
This commit is contained in:
parent
9af0050ca1
commit
10939d333d
@ -636,6 +636,8 @@ class URLBase(object):
|
||||
results['qsd'].get('verify', True))
|
||||
|
||||
# Password overrides
|
||||
if 'password' in results['qsd']:
|
||||
results['password'] = results['qsd']['password']
|
||||
if 'pass' in results['qsd']:
|
||||
results['password'] = results['qsd']['pass']
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
__title__ = 'apprise'
|
||||
__title__ = 'Apprise'
|
||||
__version__ = '0.9.1'
|
||||
__author__ = 'Chris Caron'
|
||||
__license__ = 'MIT'
|
||||
|
@ -284,7 +284,7 @@ class NotifyGitter(NotifyBase):
|
||||
# By default set wait to None
|
||||
wait = None
|
||||
|
||||
if self.ratelimit_remaining == 0:
|
||||
if self.ratelimit_remaining <= 0:
|
||||
# Determine how long we should wait for or if we should wait at
|
||||
# all. This isn't fool-proof because we can't be sure the client
|
||||
# time (calling this script) is completely synced up with the
|
||||
|
@ -562,6 +562,7 @@ class NotifyTwist(NotifyBase):
|
||||
|
||||
if not len(self.channel_ids):
|
||||
# We have nothing to notify
|
||||
self.logger.warning('There are no Twist targets to notify')
|
||||
return False
|
||||
|
||||
# Notify all of our identified channels
|
||||
|
@ -282,6 +282,19 @@ def test_notify_base_urls():
|
||||
assert 'password' in results
|
||||
assert results['password'] == "newpassword"
|
||||
|
||||
# password keyword can also optionally be used
|
||||
results = NotifyBase.parse_url(
|
||||
'https://user:pass@localhost?password=passwd')
|
||||
assert 'password' in results
|
||||
assert results['password'] == "passwd"
|
||||
|
||||
# pass= override password=
|
||||
# password keyword can also optionally be used
|
||||
results = NotifyBase.parse_url(
|
||||
'https://user:pass@localhost?pass=pw1&password=pw2')
|
||||
assert 'password' in results
|
||||
assert results['password'] == "pw1"
|
||||
|
||||
# Options
|
||||
results = NotifyBase.parse_url('https://localhost?format=invalid')
|
||||
assert 'format' not in results
|
||||
|
Loading…
Reference in New Issue
Block a user