From 580a5429f9d90a4f94de2b28589689a8216fb300 Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Tue, 12 Nov 2013 08:23:05 +0100 Subject: [PATCH] allow symlinks for the binary and resolve them --- gnupg/_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnupg/_util.py b/gnupg/_util.py index dd80632..73cbe68 100644 --- a/gnupg/_util.py +++ b/gnupg/_util.py @@ -282,7 +282,7 @@ def _find_binary(binary=None): try: assert os.path.isabs(found), "Path to gpg binary not absolute" - assert not os.path.islink(found), "Path to gpg binary is symlink" + found = os.path.realpath(found) assert os.access(found, os.X_OK), "Lacking +x perms for gpg binary" except (AssertionError, AttributeError) as ae: log.error(ae.message)