duplicity-team team mailing list archive
-
duplicity-team team
-
Mailing list archive
-
Message #01987
[Merge] lp:~mterry/duplicity/gpg-encode into lp:duplicity
Michael Terry has proposed merging lp:~mterry/duplicity/gpg-encode into lp:duplicity.
Requested reviews:
duplicity-team (duplicity-team)
Related bugs:
Bug #1276327 in duplicity (Ubuntu): "deja-dup/duplicity fails gpg encrypted backup in trusty"
https://bugs.launchpad.net/ubuntu/+source/duplicity/+bug/1276327
For more details, see:
https://code.launchpad.net/~mterry/duplicity/gpg-encode/+merge/204808
getpass.getpass(prompt) eventually calls str(prompt). Which is a no go, if the prompt contains unicode. Here's a patch to always pass getpass() a byte string.
Our tests didn't catch this because they always set PASSPHRASE. We might consider adding a test that pipes in the password.
--
https://code.launchpad.net/~mterry/duplicity/gpg-encode/+merge/204808
Your team duplicity-team is requested to review the proposed merge of lp:~mterry/duplicity/gpg-encode into lp:duplicity.
=== modified file 'bin/duplicity'
--- bin/duplicity 2014-01-21 21:04:27 +0000
+++ bin/duplicity 2014-02-04 23:52:41 +0000
@@ -160,19 +160,19 @@
if use_cache and globals.gpg_profile.signing_passphrase:
pass1 = globals.gpg_profile.signing_passphrase
else:
- pass1 = getpass.getpass(_("GnuPG passphrase for signing key:")+" ")
+ pass1 = getpass.getpass(_("GnuPG passphrase for signing key:").encode('utf8')+" ")
else:
if use_cache and globals.gpg_profile.passphrase:
pass1 = globals.gpg_profile.passphrase
else:
- pass1 = getpass.getpass(_("GnuPG passphrase:")+" ")
+ pass1 = getpass.getpass(_("GnuPG passphrase:").encode('utf8')+" ")
if n == 1:
pass2 = pass1
elif for_signing:
- pass2 = getpass.getpass(_("Retype passphrase for signing key to confirm: "))
+ pass2 = getpass.getpass(_("Retype passphrase for signing key to confirm: ").encode('utf8'))
else:
- pass2 = getpass.getpass(_("Retype passphrase to confirm: "))
+ pass2 = getpass.getpass(_("Retype passphrase to confirm: ").encode('utf8'))
if not pass1 == pass2:
print _("First and second passphrases do not match! Please try again.")
Follow ups