Browse Source

Add ntfy authentication to NEWS.

Dan Helfman 2 years ago
parent
commit
8a9d5d93f5
3 changed files with 10 additions and 7 deletions
  1. 3 0
      NEWS
  2. 6 6
      borgmatic/hooks/ntfy.py
  3. 1 1
      setup.py

+ 3 - 0
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.

+ 6 - 6
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(

+ 1 - 1
setup.py

@@ -1,6 +1,6 @@
 from setuptools import find_packages, setup
 
-VERSION = '1.7.7'
+VERSION = '1.7.8.dev0'
 
 
 setup(