repositories: Prefer gpg2 over gpg

This commit is contained in:
Laurent Bachelier 2012-04-10 07:30:21 +02:00
commit 12f867757b

View file

@ -207,7 +207,8 @@ class WeboobRepos(ReplApplication):
return os.getenv('GPG_EXECUTABLE') return os.getenv('GPG_EXECUTABLE')
paths = os.getenv('PATH', os.defpath).split(os.pathsep) paths = os.getenv('PATH', os.defpath).split(os.pathsep)
for path in paths: for path in paths:
fpath = os.path.join(path, 'gpg') for ex in ('gpg2', 'gpg'):
fpath = os.path.join(path, ex)
if os.path.exists(fpath) and os.access(fpath, os.X_OK): if os.path.exists(fpath) and os.access(fpath, os.X_OK):
return fpath return fpath