2008/8/19 Dustin J. Mitchell <[EMAIL PROTECTED]>:
> On Tue, Aug 19, 2008 at 10:29 AM, Simon Brunning
> <[EMAIL PROTECTED]> wrote:
>> I've had trouble running svnmerge programmatically via another Python
>> script. I've tried both popen2.popen4() and the subcomand module, but
>> both give me "stty: stdin isn't a terminal".
>
> BTW: please attach patches as plain text.

Patch in plain text as requested:
Index: svnmerge.py
===================================================================
--- svnmerge.py (revision 32538)
+++ svnmerge.py (working copy)
@@ -191,10 +191,11 @@
         pass

     # Parse the output of stty -a
-    out = os.popen("stty -a").read()
-    m = re.search(r"columns (\d+);", out)
-    if m:
-        return int(m.group(1))
+    if os.isatty(1):
+        out = os.popen("stty -a").read()
+        m = re.search(r"columns (\d+);", out)
+        if m:
+            return int(m.group(1))

     # sensible default
     return 80


-- 
Cheers,
Simon B.
[EMAIL PROTECTED]
http://www.brunningonline.net/simon/blog/
GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues | Twitter: brunns
_______________________________________________
Svnmerge mailing list
[email protected]
http://www.orcaware.com/mailman/listinfo/svnmerge

Reply via email to