tests/readlink.py
author anatoly techtonik <techtonik@gmail.com>
Wed, 26 Nov 2014 17:22:09 +0300
branchstable
changeset 23400 3bd577a3283e
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
merge: be precise about what merged into what in short desc

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