From 7cdc3d1ee4b7d25ca28afb18e01c0d402c663942 Mon Sep 17 00:00:00 2001 From: David Beltra Date: Tue, 21 Jul 2020 14:22:51 +0200 Subject: [PATCH] find gpg dir in path --- platform_Windows.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform_Windows.py b/platform_Windows.py index 660aba0..d5f5f36 100644 --- a/platform_Windows.py +++ b/platform_Windows.py @@ -15,7 +15,9 @@ import os # thunderbird_base = os.path.dirname(uninstall_path) def gpg_executable(thunderbird_base): - return os.path.join(os.environ['APPDATA'], 'GnuPG', 'bin', 'gpg.exe') + for p in os.environ["PATH"].split(os.pathsep): + if 'Gpg4win' in p: + return os.path.join(p, 'gpg.exe') thunderbird_base = os.path.join(os.environ['APPDATA'], 'Thunderbird')