~aaron-whitehouse/duplicity/08-python-futurize-stage-1

« back to all changes in this revision

Viewing changes to duplicity/gpg.py

  • Committer: ken
  • Date: 2016-12-25 21:55:02 UTC
  • Revision ID: ken-20161225215502-pgd8bscjb08r4u7u
* Fix some issues with testing on MacOS
* Fix problem with gpg2 in yakety and zesty

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
import re
32
32
import gzip
33
33
import locale
 
34
import platform
34
35
 
35
36
from duplicity import globals
36
37
from duplicity import gpginterface
138
139
        elif profile.gpg_major == 2:
139
140
            # This forces gpg2 to ignore the agent.
140
141
            # Necessary to enforce truly non-interactive operation.
141
 
            gnupg.options.extra_args.append('--pinentry-mode=cancel')
 
142
            if platform.platform().startswith('Linux'):
 
143
                gnupg.options.extra_args.append('--pinentry-mode=loopback')
142
144
        if globals.gpg_options:
143
145
            for opt in globals.gpg_options.split():
144
146
                gnupg.options.extra_args.append(opt)