David Grimberg wrote:

> Jesse,
> 
> I hit that same error, and on investigating it discovered that when you
> use
> the -b switch tmda-pending runs a subclassed version of the Queue class. 
> I took advantage of this difference to and modified the Queue class and
> it's subclass InteractiveQueue to have a new "interactive" property that
> gets checked by the initQueue method.
> 
> You can try the editing your Pending.py file to contain the following new
> and revised lines, however, I think you will need to do this by hand since
> this is the second revision from the v1.0.2 baseline code, so the line
> numbers are likely to be off.

Done. See below for the revised patch. Can we get this committed to CVS?
I'm going to submit a temporary patch to Gentoo Portage also..



# diff -u Pending.py.bak.20041011 Pending.py
--- Pending.py.bak.20041011     2004-10-11 15:50:13.014474866 -0400
+++ Pending.py  2004-10-11 16:06:02.640603837 -0400
@@ -64,6 +64,7 @@
         self.verbose = verbose
         self.younger = younger
         self.pretend = pretend
+        self.interactive = 0

         self.stdout = sys.stdout

@@ -86,8 +87,9 @@
                     self.msgs.extend(line.strip().split())
                 self.msgs.remove('-')
                 # re-open stdin on the tty
-                sys.stdin.close()
-                sys.stdin = open('/dev/tty', 'r')
+                if self.interactive:
+                    sys.stdin.close()
+                    sys.stdin = open('/dev/tty', 'r')

         if not self.msgs and not wantedstdin:
             cwd = os.getcwd()
@@ -341,6 +343,8 @@
                        younger,
                        pretend)

+        self.interactive = 1
+

     def initQueue(self):
         """Additionally initialize the interactive queue."""



-- 
Jesse Guardiani, Systems Administrator
WingNET Internet Services,
P.O. Box 2605 // Cleveland, TN 37320-2605
423-559-LINK (v)  423-559-5145 (f)
http://www.wingnet.net


_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to