~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/gpg.py

  • Committer: Jelmer Vernooij
  • Date: 2011-12-15 01:41:23 UTC
  • mto: (6372.1.2 904550-default-gpg-key)
  • mto: This revision was merged to the branch mainline in revision 6374.
  • Revision ID: jelmer@samba.org-20111215014123-11zk7pajade6iv75
Clumsily fix gpg_signing_key.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
import subprocess
28
28
 
29
29
from bzrlib import (
 
30
    config as _mod_config,
30
31
    errors,
31
32
    trace,
32
33
    ui,
181
182
            return False
182
183
 
183
184
    def _command_line(self):
 
185
        key = self._config_stack.get('gpg_signing_key')
 
186
        if key is None:
 
187
            key = _mod_config.extract_email_address(self._config_stack.get('email'))
184
188
        return [self._config_stack.get('gpg_signing_command'), '--clearsign',
185
 
                '-u', self._config_stack.get('gpg_signing_key')]
 
189
                '-u', key]
186
190
 
187
191
    def sign(self, content):
188
192
        if isinstance(content, unicode):