~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/gpg.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-13 14:50:21 UTC
  • mto: This revision was merged to the branch mainline in revision 1921.
  • Revision ID: john@arbash-meinel.com-20060813145021-25b3c7cbc38f7398
Adding some logging, because on my machine TTY is not exported by default.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import os
22
22
import subprocess
23
23
 
24
 
import bzrlib.errors as errors
 
24
from bzrlib import (
 
25
    errors,
 
26
    trace,
 
27
    )
25
28
 
26
29
 
27
30
class DisabledGPGStrategy(object):
48
51
    tty = os.environ.get('TTY')
49
52
    if tty is not None:
50
53
        os.environ['GPG_TTY'] = tty
 
54
        trace.mutter('setting GPG_TTY=%s', tty)
 
55
    else:
 
56
        # This is not quite worthy of a warning, because some people
 
57
        # don't need GPG_TTY to be set. But it is worthy of a big mark
 
58
        # in ~/.bzr.log, so that people can debug it if it happens to them
 
59
        trace.mutter('** Env var TTY empty, cannot set GPG_TTY.'
 
60
                     '  Is TTY exported?')
51
61
 
52
62
 
53
63
class GPGStrategy(object):