~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/gpg.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-06 15:32:11 UTC
  • mto: This revision was merged to the branch mainline in revision 1990.
  • Revision ID: john@arbash-meinel.com-20060906153211-9519b9dfdf3daf60
Don't use preexec_fn on win32

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
 
73
73
    def sign(self, content):
74
74
        ui.ui_factory.clear_term()
 
75
 
 
76
        preexec_fn = _set_gpg_tty
 
77
        if sys.platform == 'win32':
 
78
            # Win32 doesn't support preexec_fn, but wouldn't support TTY anyway.
 
79
            preexec_fn = None
75
80
        try:
76
81
            process = subprocess.Popen(self._command_line(),
77
82
                                       stdin=subprocess.PIPE,
78
83
                                       stdout=subprocess.PIPE,
79
 
                                       preexec_fn=_set_gpg_tty)
 
84
                                       preexec_fn=preexec_fn)
80
85
            try:
81
86
                result = process.communicate(content)[0]
82
87
                if process.returncode is None: