diff --git a/NEWS b/NEWS index 50063cbff..24b49decc 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +1.7.8.dev0 + * #621: Add optional authentication to the ntfy monitoring hook. + 1.7.7 * #642: Add MySQL database hook "add_drop_database" configuration option to control whether dumped MySQL databases get dropped right before restore. diff --git a/borgmatic/hooks/ntfy.py b/borgmatic/hooks/ntfy.py index 3120500f3..99ed254a7 100644 --- a/borgmatic/hooks/ntfy.py +++ b/borgmatic/hooks/ntfy.py @@ -62,14 +62,14 @@ def ping_monitor(hook_config, config_filename, state, monitoring_log_level, dry_ auth = None if (username and password) is not None: auth = requests.auth.HTTPBasicAuth(username, password) - logger.info(f'{config_filename}: Using basic auth with user {username} for Ntfy') + logger.info(f'{config_filename}: Using basic auth with user {username} for ntfy') elif username is not None: - logger.warn( - f'{config_filename}: Password missing for Ntfy authentication, defaulting to no auth' + logger.warning( + f'{config_filename}: Password missing for ntfy authentication, defaulting to no auth' ) elif password is not None: - logger.warn( - f'{config_filename}: Username missing for Ntfy authentication, defaulting to no auth' + logger.warning( + f'{config_filename}: Username missing for ntfy authentication, defaulting to no auth' ) if not dry_run: @@ -79,7 +79,7 @@ def ping_monitor(hook_config, config_filename, state, monitoring_log_level, dry_ if not response.ok: response.raise_for_status() except requests.exceptions.RequestException as error: - logger.warning(f'{config_filename}: Ntfy error: {error}') + logger.warning(f'{config_filename}: ntfy error: {error}') def destroy_monitor( diff --git a/setup.py b/setup.py index c3222198d..88a780e69 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import find_packages, setup -VERSION = '1.7.7' +VERSION = '1.7.8.dev0' setup(