release-announcement: support older version of python-gnupg
In older versions of python-gnupg (at least in version 0.4.1 which is the version that gets installed on Ubuntu 14.04) the GPG constructor expects a parameter named `gnupghome` rather than `homedir` and will fail with a TypeError. Add handling of the TypeError and try again with the older parameter name. Change-Id: Ib5f9d652c59e48b6d76e1ddae48d4ae0cad850ba
This commit is contained in:
parent
cba2cf5d5b
commit
fdb5187705
@ -142,7 +142,10 @@ def _main():
|
||||
if not os.path.isdir(gpghome):
|
||||
print("Skipping signing due to missing gnupg home folder")
|
||||
else:
|
||||
gpg = GPG(homedir=gpghome)
|
||||
try:
|
||||
gpg = GPG(homedir=gpghome)
|
||||
except TypeError:
|
||||
gpg = GPG(gnupghome=gpghome)
|
||||
signed = gpg.sign(output)
|
||||
filename = filename + ".asc"
|
||||
with open(filename, "w") as f:
|
||||
|
Loading…
Reference in New Issue
Block a user