tests/readlink.py
author Mads Kiilerich <madski@unity3d.com>
Mon, 07 Apr 2014 23:17:51 +0200
changeset 20986 6ae0c41e4b52
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
backout: don't limit heritage check to a single ancestor This do probably not make any real difference but is slightly more correct and we would like to get rid of changelog.ancestor.

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