general code enhancements/nomenclature

This commit is contained in:
Chris Caron 2021-03-04 10:23:49 -05:00
parent 9af0050ca1
commit 10939d333d
5 changed files with 18 additions and 2 deletions

View File

@ -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']

View File

@ -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'

View File

@ -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

View File

@ -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

View File

@ -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