~testdoc-dev/testdoc/trunk.git

« back to all changes in this revision

Viewing changes to bin/testdoc

  • Committer: Andrew Bennetts
  • Date: 2010-09-07 06:55:04 UTC
  • mto: This revision was merged to the branch mainline in revision 19.
  • Revision ID: git-v1:f03d4fc7122485a1061915685c5c1d5104da34a0
Don't traceback for EPIPE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
    doc = documenter.Documenter(format)
54
54
    for arg in args:
55
55
        module = string_to_module(arg)
56
 
        finder.find_tests(doc, module)
 
56
        try:
 
57
            finder.find_tests(doc, module)
 
58
        except IOError, e:
 
59
            import errno
 
60
            if e.errno == getattr(errno, 'EPIPE', None):
 
61
                sys.stderr.write('testdoc: broken pipe\n')
 
62
                return
 
63
            raise
57
64
 
58
65
 
59
66
if __name__ == '__main__':