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,9 +207,10 @@ class WeboobRepos(ReplApplication):
return os.getenv('GPG_EXECUTABLE')
paths = os.getenv('PATH', os.defpath).split(os.pathsep)
for path in paths:
fpath = os.path.join(path, 'gpg')
if os.path.exists(fpath) and os.access(fpath, os.X_OK):
return fpath
for ex in ('gpg2', 'gpg'):
fpath = os.path.join(path, ex)
if os.path.exists(fpath) and os.access(fpath, os.X_OK):
return fpath
def _archive_excludes(self, filename):
# Skip *.pyc files in tarballs.