Skip to content

Commit

Permalink
Update apprise lib
Browse files Browse the repository at this point in the history
  • Loading branch information
FieldofClay committed Mar 27, 2024
1 parent 71ff9a2 commit 8a417b1
Show file tree
Hide file tree
Showing 11 changed files with 1,122 additions and 169 deletions.
2 changes: 1 addition & 1 deletion default/app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ label = Apprise Alert Action

[launcher]
author = Michael Clayfield
version = 1.1.0
version = 1.1.1
description = Alert Action based on Apprise, for sending alerts to many different sources.
6 changes: 3 additions & 3 deletions lib/apprise/URLBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

import re
from .logger import logger
from time import sleep
import time
from datetime import datetime
from xml.sax.saxutils import escape as sax_escape

Expand Down Expand Up @@ -298,12 +298,12 @@ def throttle(self, last_io=None, wait=None):

if wait is not None:
self.logger.debug('Throttling forced for {}s...'.format(wait))
sleep(wait)
time.sleep(wait)

elif elapsed < self.request_rate_per_sec:
self.logger.debug('Throttling for {}s...'.format(
self.request_rate_per_sec - elapsed))
sleep(self.request_rate_per_sec - elapsed)
time.sleep(self.request_rate_per_sec - elapsed)

# Update our timestamp before we leave
self._last_io_datetime = datetime.now()
Expand Down
2 changes: 1 addition & 1 deletion lib/apprise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# POSSIBILITY OF SUCH DAMAGE.

__title__ = 'Apprise'
__version__ = '1.7.2'
__version__ = '1.7.4'
__author__ = 'Chris Caron'
__license__ = 'BSD'
__copywrite__ = 'Copyright (C) 2024 Chris Caron <[email protected]>'
Expand Down
23 changes: 22 additions & 1 deletion lib/apprise/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,32 @@
DEFAULT_CONFIG_PATHS = (
# Legacy Path Support
'~/.apprise',
'~/.apprise.conf',
'~/.apprise.yml',
'~/.apprise.yaml',
'~/.config/apprise',
'~/.config/apprise.conf',
'~/.config/apprise.yml',
'~/.config/apprise.yaml',

# Plugin Support Extended Directory Search Paths
'~/.apprise/apprise',
'~/.apprise/apprise.conf',
'~/.apprise/apprise.yml',
'~/.apprise/apprise.yaml',
'~/.config/apprise/apprise',
'~/.config/apprise/apprise.conf',
'~/.config/apprise/apprise.yml',
'~/.config/apprise/apprise.yaml',

# Global Configuration Support
# Global Configuration File Support
'/etc/apprise',
'/etc/apprise.yml',
'/etc/apprise.yaml',
'/etc/apprise/apprise',
'/etc/apprise/apprise.conf',
'/etc/apprise/apprise.yml',
'/etc/apprise/apprise.yaml',
)

# Define our paths to search for plugins
Expand All @@ -98,25 +109,35 @@
# Default Config Search Path for Windows Users
DEFAULT_CONFIG_PATHS = (
expandvars('%APPDATA%\\Apprise\\apprise'),
expandvars('%APPDATA%\\Apprise\\apprise.conf'),
expandvars('%APPDATA%\\Apprise\\apprise.yml'),
expandvars('%APPDATA%\\Apprise\\apprise.yaml'),
expandvars('%LOCALAPPDATA%\\Apprise\\apprise'),
expandvars('%LOCALAPPDATA%\\Apprise\\apprise.conf'),
expandvars('%LOCALAPPDATA%\\Apprise\\apprise.yml'),
expandvars('%LOCALAPPDATA%\\Apprise\\apprise.yaml'),

#
# Global Support
#

# C:\ProgramData\Apprise\
expandvars('%ALLUSERSPROFILE%\\Apprise\\apprise'),
expandvars('%ALLUSERSPROFILE%\\Apprise\\apprise.conf'),
expandvars('%ALLUSERSPROFILE%\\Apprise\\apprise.yml'),
expandvars('%ALLUSERSPROFILE%\\Apprise\\apprise.yaml'),

# C:\Program Files\Apprise
expandvars('%PROGRAMFILES%\\Apprise\\apprise'),
expandvars('%PROGRAMFILES%\\Apprise\\apprise.conf'),
expandvars('%PROGRAMFILES%\\Apprise\\apprise.yml'),
expandvars('%PROGRAMFILES%\\Apprise\\apprise.yaml'),

# C:\Program Files\Common Files
expandvars('%COMMONPROGRAMFILES%\\Apprise\\apprise'),
expandvars('%COMMONPROGRAMFILES%\\Apprise\\apprise.conf'),
expandvars('%COMMONPROGRAMFILES%\\Apprise\\apprise.yml'),
expandvars('%COMMONPROGRAMFILES%\\Apprise\\apprise.yaml'),
)

# Default Plugin Search Path for Windows Users
Expand Down
Loading

0 comments on commit 8a417b1

Please sign in to comment.