From 8b2c0dae177d2b34f633dec15c5686525476bf76 Mon Sep 17 00:00:00 2001 From: TEC Date: Sun, 12 Jul 2020 03:33:02 +0800 Subject: [PATCH] Fix illegal format spec in imapnotifyconfig script --- config.org | 4 ++-- misc/mbsync-imapnotify.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config.org b/config.org index bfb150a..17870aa 100644 --- a/config.org +++ b/config.org @@ -1273,7 +1273,7 @@ def finaliseAccount(): except subprocess.TimeoutExpired as e: print( f"\033[1;31mError:\033[0;31m failed to fetch mailboxes (skipping): " - + f"`{' '.join(e.cmd)}' timed out after {e.timeout.2f} seconds\033[0;37m" + + f"`{' '.join(e.cmd)}' timed out after {e.timeout:.2f} seconds\033[0;37m" ) return @@ -1425,7 +1425,7 @@ def setSystemdServiceState(state, service): + f"returned code {e.returncode}\033[0;37m" ) except subprocess.TimeoutExpired as e: - print(f" \033[1;31mtimed out after {e.timeout.2f} seconds\033[0;37m") + print(f" \033[1;31mtimed out after {e.timeout:.2f} seconds\033[0;37m") return False diff --git a/misc/mbsync-imapnotify.py b/misc/mbsync-imapnotify.py index 49b4268..4fa8927 100755 --- a/misc/mbsync-imapnotify.py +++ b/misc/mbsync-imapnotify.py @@ -96,7 +96,7 @@ def finaliseAccount(): except subprocess.TimeoutExpired as e: print( f"\033[1;31mError:\033[0;31m failed to fetch mailboxes (skipping): " - + f"`{' '.join(e.cmd)}' timed out after {e.timeout.2f} seconds\033[0;37m" + + f"`{' '.join(e.cmd)}' timed out after {e.timeout:.2f} seconds\033[0;37m" ) return @@ -248,7 +248,7 @@ def setSystemdServiceState(state, service): + f"returned code {e.returncode}\033[0;37m" ) except subprocess.TimeoutExpired as e: - print(f" \033[1;31mtimed out after {e.timeout.2f} seconds\033[0;37m") + print(f" \033[1;31mtimed out after {e.timeout:.2f} seconds\033[0;37m") return False