~ed.so/duplicity/webdav200fix-0.7

« back to all changes in this revision

Viewing changes to bin/duplicity

  • Committer: Kenneth Loafman
  • Date: 2014-04-19 19:54:54 UTC
  • mfrom: (967.4.1 encode)
  • Revision ID: kenneth@loafman.com-20140419195454-2r35nyqto7bvju09
* Merged in lp:~mterry/duplicity/encode-for-print
  - Encode translated strings before passing them to 'print'.
  - The print command can only apparently handle bytes. So when we pass it
    unicode, it freaks out. There were only four instances I saw where we used
    print, so I figured it was easiest to just convert them to use the log
    framework too.
  - That way all user-visible strings go through that framework and are subject
    to the same encoding rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
175
175
                pass2 = getpass_safe(_("Retype passphrase to confirm: "))
176
176
 
177
177
            if not pass1 == pass2:
178
 
                print _("First and second passphrases do not match!  Please try again.")
 
178
                log.Log(_("First and second passphrases do not match!  Please try again."), log.WARNING, force_print=True)
179
179
                use_cache = False
180
180
                continue
181
181
 
182
182
            if not pass1 and not (globals.gpg_profile.recipients or globals.gpg_profile.hidden_recipients) and not for_signing:
183
 
                print _("Cannot use empty passphrase with symmetric encryption!  Please try again.")
 
183
                log.Log(_("Cannot use empty passphrase with symmetric encryption!  Please try again."), log.WARNING, force_print=True)
184
184
                use_cache = False
185
185
                continue
186
186
 
587
587
    """
588
588
    if globals.print_statistics:
589
589
        diffdir.stats.TotalDestinationSizeChange = bytes_written
590
 
        print diffdir.stats.get_stats_logstring(_("Backup Statistics"))
 
590
        logstring = diffdir.stats.get_stats_logstring(_("Backup Statistics"))
 
591
        log.Log(logstring, log.NOTICE, force_print=True)
591
592
 
592
593
 
593
594
def incremental_backup(sig_chain):