On 10/24/07, Dustin J. Mitchell <[EMAIL PROTECTED]> wrote:
>
> On 10/23/07, Eric Kolve <[EMAIL PROTECTED]> wrote:
> > I tried running svnmerge.py trunk inside of a cron job and it failed
> with this:
> >
> > stty: standard input: Invalid argument
> >
> >
> > I traced it back to this block of code:
> >
> > # 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))
> >
> > I think the best thing might be to check if the TERM environment var
> > is set before attempting this.
>
> Good catch. Patch attached -- any thoughts?
In C code the way to check for this is using the isatty(3) function... in
python there may be an equivalent wrapper function. This would be a (very
slightly) better way to check.
--
Archie L. Cobbs
CTO, Awarix, Inc.
http://www.awarix.com
_______________________________________________
Svnmerge mailing list
[email protected]
http://www.orcaware.com/mailman/listinfo/svnmerge