~benoit.bertholon/duplicity/duplicity

« back to all changes in this revision

Viewing changes to duplicity/commandline.py

  • Committer: Kenneth Loafman
  • Date: 2017-01-19 17:54:29 UTC
  • Revision ID: kenneth@loafman.com-20170119175429-ttmf5pddsqftqwq6
* Fixed bug #1655268 "--gpg-binary option not working"
  - If gpg binary is specified rebuild gpg profile using new binary location

Show diffs side-by-side

added added

removed removed

Lines of Context:
1089
1089
    "remove-old", "restore", "verify", "full", or "inc".
1090
1090
 
1091
1091
    """
 
1092
    # build initial gpg_profile
1092
1093
    globals.gpg_profile = gpg.GPGProfile()
1093
1094
 
 
1095
    # parse command line
1094
1096
    args = parse_cmdline_options(cmdline_list)
1095
1097
 
 
1098
    # if we get a different gpg-binary from the commandline then redo gpg_profile
 
1099
    if globals.gpg_binary is not None:
 
1100
        src = globals.gpg_profile
 
1101
        globals.gpg_profile = gpg.GPGProfile(
 
1102
            passphrase=src.passphrase,
 
1103
            sign_key=src.sign_key,
 
1104
            recipients=src.recipients,
 
1105
            hidden_recipients=src.hidden_recipients)
 
1106
    log.Debug(_("GPG binary is %s, version %d") %
 
1107
        ((globals.gpg_binary or 'gpg'), globals.gpg_profile.gpg_major))
 
1108
 
1096
1109
    # we can now try to import all the backends
1097
1110
    backend.import_backends()
1098
1111