--- gpg.0.7.12.py 2017-04-07 19:19:15.985419738 -0400 +++ gpg.py 2017-04-07 19:20:08.723423281 -0400 @@ -137,7 +137,7 @@ if globals.use_agent and profile.gpg_version < (2, 0, 0): # gpg2 always requires the agent where gpg1 does not gnupg.options.extra_args.append('--use-agent') - if profile.gpg_version >= (2, 1, 0): + if profile.gpg_version >= (2, 1, 0) and not globals.use_agent: # This forces gpg2 to ignore the agent. # Necessary to enforce truly non-interactive operation. gnupg.options.extra_args.append('--pinentry-mode=loopback')