This patch fixes a bug keeping GnuPGInterface from working on my system. (Linux, Python 2.1) It also changes the docstrings slightly to accomodate emacs python-unfriendly syntax highlighting. --drt@un.bewaff.net - http://c0re.jp/ --- GnuPGInterface-0.3.0-orig/GnuPGInterface.py Sun Sep 23 19:46:50 2001 +++ GnuPGInterface-0.3.0/GnuPGInterface.py Sun Sep 23 19:57:50 2001 @@ -159,9 +159,9 @@ >>> # just a small sanity test here for doctest >>> import types >>> assert type(ciphertext) == types.StringType, \ - "What GnuPG gave back isn't a string!" + "What GnuPG gave back isn not a string!" -Here's an example of generating a key: +Here is an example of generating a key: >>> import GnuPGInterface >>> gnupg = GnuPGInterface.GnuPG() >>> gnupg.options.meta_interactive = 0 @@ -386,6 +386,12 @@ % fh_name pipe = os.pipe() + # pipes are unidirectional - at least on some systems + # which run python. so we have to 'turn the pipe in + # the right direction' --drt@un.bewaff.net + if _fd_modes[fh_name] == 'w': + pipe = (pipe[1], pipe[0]) + process._pipes[fh_name] = Pipe(pipe[0], pipe[1], 0) for fh_name, fh in attach_fhs.items():