tests/readlink.py
author Gregory Szorc <gregory.szorc@gmail.com>
Sat, 19 Apr 2014 23:26:15 -0700
changeset 21346 02087bc4f143
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
run-tests: move PYTHONDIR out of a global

#!/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)