[Svnmerge] svnmerge.py breaks in cron

Alan Barrett apb at cequrux.com
Wed Oct 24 12:08:13 PDT 2007


On Wed, 24 Oct 2007, Dustin J. Mitchell wrote:
> +    # Parse the output of stty -a, if we have a terminal
> +    if os.environ.get('TERM', '') and os.isatty(1):

stty traditionally works on stdin, not stdout, so I think you want
os.isatty(0).

> +        try:
> +            os.putenv('LC_ALL', 'C')
> +            out = os.popen("stty -a").read()
> +        except:
> +            # ignore all errors
> +            out = ''

Perhaps insert "except KeyboardInterrupt: raise" above the "except:".

Perhaps use "stty -a 2>/dev/null" to hide error messages from stty.

--apb (Alan Barrett)



More information about the Svnmerge mailing list