"Jason R. Mastaler" <[EMAIL PROTECTED]> writes:
> I've been staring at this bug report, and don't have any ideas. Does
> anyone have any input on how to fix this problem?
This patch fixes it on my system, as well as a couple of other
annoying implementation details all clustered in the same spot. You
might want to test it on systems other than FreeBSD, which is all I
have here right now.
Tim
Index: Pending.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/Pending.py,v
retrieving revision 1.21
diff -u -r1.21 Pending.py
--- Pending.py 26 May 2003 00:43:05 -0000 1.21
+++ Pending.py 21 Aug 2003 04:59:02 -0000
@@ -64,7 +64,6 @@
self.verbose = verbose
self.younger = younger
self.pretend = pretend
- self.wantedstdin = 0
self.stdout = sys.stdout
@@ -79,14 +78,18 @@
# via standard input. (Since it's pointless to call it twice,
# it's safe to remove any subsequent occurrences in the list after
# processing.)
+ wantedstdin = 0
for msgid in self.msgs:
if msgid == '-':
- self.wantedstdin = 1
+ wantedstdin = 1
for line in sys.stdin.readlines():
- self.msgs.append(line.strip())
+ self.msgs.extend(line.strip().split())
self.msgs.remove('-')
+ # re-open stdin on the tty
+ sys.stdin.close()
+ sys.stdin = file('/dev/tty', 'r')
- if not self.msgs and not self.wantedstdin:
+ if not self.msgs and not wantedstdin:
cwd = os.getcwd()
os.chdir(self.pendingdir)
self.msgs = glob.glob('*.*.msg*')