← Back to team overview

duplicity-team team mailing list archive

[Merge] lp:~ed.so/duplicity/reuse-passphrase-for-signing-fix into lp:duplicity

 

edso has proposed merging lp:~ed.so/duplicity/reuse-passphrase-for-signing-fix into lp:duplicity.

Requested reviews:
  duplicity-team (duplicity-team)

For more details, see:
https://code.launchpad.net/~ed.so/duplicity/reuse-passphrase-for-signing-fix/+merge/72541

fixes

duplicity claiming: PASSPHRASE variable not set

ede

-- 
https://code.launchpad.net/~ed.so/duplicity/reuse-passphrase-for-signing-fix/+merge/72541
Your team duplicity-team is requested to review the proposed merge of lp:~ed.so/duplicity/reuse-passphrase-for-signing-fix into lp:duplicity.
=== modified file 'duplicity-bin'
--- duplicity-bin	2011-08-19 15:44:54 +0000
+++ duplicity-bin	2011-08-23 09:49:17 +0000
@@ -90,15 +90,15 @@
     ## if signing key is also an encryption key assume that the passphrase is identical
     if ( for_signing
          and globals.gpg_profile.sign_key in globals.gpg_profile.recipients
-         and globals.gpg_profile.passphrase is not None ):
-        log.Notice(_("Reuse already set PASSPHRASE as SIGNING_PASSPHRASE"))
-        return globals.gpg_profile.passphrase
+         and 'PASSPHRASE' in os.environ ):
+        log.Notice(_("Reuse configured PASSPHRASE as SIGN_PASSPHRASE"))
+        return os.environ['PASSPHRASE']
     ## if one encryption key is also the signing key assume that the passphrase is identical
     if ( not for_signing
          and globals.gpg_profile.sign_key in globals.gpg_profile.recipients
-         and globals.gpg_profile.signing_passphrase is not None ):
-        log.Notice(_("Reuse already set SIGNING_PASSPHRASE as PASSPHRASE"))
-        return globals.gpg_profile.signing_passphrase
+         and 'SIGN_PASSPHRASE' in os.environ ):
+        log.Notice(_("Reuse configured SIGN_PASSPHRASE as PASSPHRASE"))
+        return os.environ['SIGN_PASSPHRASE']
 
     # Next, verify we need to ask the user
 


Follow ups