added check for travis in gpg homedir
This commit is contained in:
parent
b1c0567c98
commit
d0a93ef2de
@ -38,6 +38,9 @@ class Core:
|
||||
''' Generate the main PGP key for our client. Should not be done often.
|
||||
Uses own PGP home folder in the data/ directory. '''
|
||||
# Generate main pgp key
|
||||
if os.getenv('TRAVIS') == 'true':
|
||||
gpg = gnupg.GPG(homedir='./data/pgp/')
|
||||
else:
|
||||
gpg = gnupg.GPG(gnupghome='./data/pgp/')
|
||||
input_data = gpg.gen_key_input(key_type="RSA", key_length=2048, name_real=myID, name_email='anon@onionr')
|
||||
#input_data = gpg.gen_key_input(key_type="RSA", key_length=1024)
|
||||
|
@ -66,6 +66,9 @@ class OnionrUtils():
|
||||
'''Export our PGP key if it exists'''
|
||||
if not os.path.exists(self.fingerprintFile):
|
||||
raise Exception("No fingerprint found, cannot export our PGP key.")
|
||||
if os.getenv('TRAVIS') == 'true':
|
||||
gpg = gnupg.GPG(homedir='./data/pgp/')
|
||||
else:
|
||||
gpg = gnupg.GPG(gnupghome='./data/pgp/')
|
||||
with open(self.fingerprintFile,'r') as f:
|
||||
fingerprint = f.read()
|
||||
|
Loading…
Reference in New Issue
Block a user