Remove commented out code from GPG.gen_key() for import after generation.

* Generated keys in separate keyring would not be available after switching
   back to the normal keyrings (not the ones set up for key generation), so at
   first in the unittests I imported them back into the main keyrings… this,
   however, is would be stupid, as in nullifies half the reasons for using
   separate keyrings in the first place, thus the code was commented out. Now
   that the temporary keyrings are placed in the gnupg.GPG._generated_keys
   directory, it would be nice to eventually either extend GPG.import_keys()
   or add a new helper function for doing:

       $ gpg --no-default-keyring --keyring pubring.gpg \
            --keyring ./generated-keys/<some_fingerprint>.gpg
testing/mmn/mktime_takes_localtime_not_gmtime
Isis Lovecruft 2013-06-28 06:44:52 +00:00
parent 9008faa0db
commit 8232f14f2a
No known key found for this signature in database
GPG Key ID: A3ADB67A2CDB8B35
1 changed files with 0 additions and 2 deletions

View File

@ -506,14 +506,12 @@ class GPG(GPGBase):
try: os.rename(self.temp_keyring, prefix+".pubring")
except OSError as ose: log.error(ose.message)
else: self.temp_keyring = None
#finally: self.import_keys(fpr)
if self.temp_secring:
if os.path.isfile(self.temp_secring):
try: os.rename(self.temp_secring, prefix+".secring")
except OSError as ose: log.error(ose.message)
else: self.temp_secring = None
#finally: self.import_keys(fpr)
log.info("Key created. Fingerprint: %s" % fpr)
return key