New submission from Mike Miller <python....@mgmiller.net>:

When pydoc is run from the command line and unable to write a file for a
module because of a syntax error, it would be helpful to return a
non-zero status code as a result.

What it does currently:
    C:\>C:\python26\Lib\pydoc.py -w mymod
    problem in .\mymod.py - <type 'exceptions.SyntaxError'>: invalid
syntax (mymod.py, line 1)

    C:\>echo %ERRORLEVEL%
    0

What it should do if an error is found:
    C:\>type doesnt_exist.txt
    The system cannot find the file specified.

    C:\>echo %ERRORLEVEL%
    1


This would allow us to make our build scripts able to react to error
conditions, etc without having to use another script.  Thanks.

----------
components: Library (Lib)
messages: 86837
nosy: mixmastamyk
severity: normal
status: open
title: pydoc to return error status code
type: feature request
versions: Python 2.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5884>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to