/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to mandos

  • Committer: Teddy Hogeborn
  • Date: 2016-06-03 17:23:10 UTC
  • Revision ID: teddy@recompile.se-20160603172310-ohavcfobfjb5v2hr
mandos: Bug fix: Only use the --no-use-agent option for GPG 1

* mandos (PGPEngine.__init__): Only use option "--no-use-agent" with
                               GPG 1, as GPG 2 does not support it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
        self.gnupgargs = ['--batch',
181
181
                          '--homedir', self.tempdir,
182
182
                          '--force-mdc',
183
 
                          '--quiet',
184
 
                          '--no-use-agent']
 
183
                          '--quiet']
 
184
        # Only GPG version 1 has the --no-use-agent option.
 
185
        if self.gpg == "gpg" or self.gpg.endswith("/gpg"):
 
186
            self.gnupgargs.append("--no-use-agent")
185
187
    
186
188
    def __enter__(self):
187
189
        return self