Hello! We are running our annual fundraising. Please consider making a donation if you value this freely available service or want to support people around the world working towards liberatory social change. https://riseup.net/donate.

Commit 39622e2a authored by Tobias Mueller's avatar Tobias Mueller Committed by anarcat
Browse files

gpg: Use os.path.expanduser instead of the environment variable

This reflects better where gpg actually locates the home directory
and it should work better on other plaforms.
Also discussed here: http://stackoverflow.com/a/4028943/2015768
parent 741dde1c
......@@ -306,7 +306,7 @@ class Keyring():
if homedir is not None:
self.context.set_option('homedir', homedir)
homedir = os.environ['HOME'] + '/.gnupg'
homedir = os.path.join((os.path.expanduser("~"), '.gnupg'))
if 'GNUPGHOME' in os.environ:
homedir = os.environ['GNUPGHOME']
self.homedir = homedir
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment