tests/readlink.py
author Patrick Mezard <pmezard@gmail.com>
Tue, 10 Nov 2009 11:57:03 +0100
changeset 9817 912ce84eebae
parent 5683 396c7010b0cd
child 10282 08a0f04b56bd
permissions -rwxr-xr-x
hghave: be more tolerant to rst2html output On Windows, rst2html.bat calls rst2html.py, printing something like: "rst2html.py (Docutils" (notice the extra ".py")

#!/usr/bin/env python

import errno, os, sys

for f in sys.argv[1:]:
    try:
        print f, '->', os.readlink(f)
    except OSError, err:
        if err.errno != errno.EINVAL: raise
        print f, 'not a symlink'

sys.exit(0)