/[duplicity]/duplicity/duplicity-bin
ViewVC logotype

Diff of /duplicity/duplicity-bin

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by bescoto, Sun Mar 9 07:36:36 2003 UTC revision 1.17 by bescoto, Thu Aug 14 06:16:33 2003 UTC
# Line 37  exit_val = None Line 37  exit_val = None
37  def get_passphrase():  def get_passphrase():
38          """Get passphrase from environment or, failing that, from user"""          """Get passphrase from environment or, failing that, from user"""
39          try: return os.environ['PASSPHRASE']          try: return os.environ['PASSPHRASE']
40          except KeyError:          except KeyError: pass
41                  if globals.encryption:          if not globals.encryption: return "" # assume we don't need passphrase
                         log.Log("PASSPHRASE variable not set, asking user.", 5)  
                         return getpass.getpass("GnuPG passphrase: ")  
                 else: return "" # assume we don't need passphrase  
42    
43            log.Log("PASSPHRASE variable not set, asking user.", 5)
44            while 1:
45                    pass1 = getpass.getpass("GnuPG passphrase: ")
46                    pass2 = getpass.getpass("Retype to confirm: ")
47                    if pass1 == pass2: return pass1
48                    print "First and second passphrases do not match!  Please try again."
49    
50  def write_multivol(backup_type, tarblock_iter, backend):  def write_multivol(backup_type, tarblock_iter, backend):
51          """Encrypt volumes of tarblock_iter and write to backend          """Encrypt volumes of tarblock_iter and write to backend

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26