Change how we create the pubring.gpg and secring.gpg.
parent
a4b8c7823f
commit
85fc2692a5
|
@ -389,7 +389,7 @@ class GPG(object):
|
|||
for ring in [self.secring, self.pubring]:
|
||||
if ring and not os.path.isfile(ring):
|
||||
with open(ring, 'a+') as ringfile:
|
||||
ringfile.write(" ")
|
||||
ringfile.write("")
|
||||
ringfile.flush()
|
||||
try:
|
||||
assert _has_readwrite(ring), \
|
||||
|
@ -864,7 +864,7 @@ class GPG(object):
|
|||
parms.setdefault('Key-Type', 'RSA')
|
||||
parms.setdefault('Key-Length', 4096)
|
||||
parms.setdefault('Name-Real', "Autogenerated Key")
|
||||
parms.setdefault('Name-Comment', "Generated by gnupg.py")
|
||||
parms.setdefault('Name-Comment', "Generated by python-gnupg")
|
||||
try:
|
||||
logname = os.environ['LOGNAME']
|
||||
except KeyError:
|
||||
|
@ -875,8 +875,8 @@ class GPG(object):
|
|||
out = "Key-Type: %s\n" % parms.pop('Key-Type')
|
||||
for key, val in list(parms.items()):
|
||||
out += "%s: %s\n" % (key, val)
|
||||
out += "%%pubring %s.pub\n" % self.pubring
|
||||
out += "%%secring %s.pub\n" % self.secring
|
||||
out += "%%pubring %s\n" % self.pubring
|
||||
out += "%%secring %s\n" % self.secring
|
||||
out += "%commit\n"
|
||||
return out
|
||||
|
||||
|
|
Loading…
Reference in New Issue