tests/readlink.py
author Augie Fackler <augie@google.com>
Mon, 14 Dec 2015 18:54:03 -0500
changeset 27344 43c00ca887d1
parent 25660 328739ea70c3
child 29175 7bcfb9090c86
permissions -rwxr-xr-x
merge: have merge.update use a matcher instead of partial fn This is relatively rarely used functionality, but migrating this to a matcher will make future work on narrow clones more feasible.

#!/usr/bin/env python

import errno, os, sys

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

sys.exit(0)