tests/readlink.py
author Siddharth Agarwal <sid0@fb.com>
Wed, 18 Nov 2015 15:04:03 -0800
changeset 27019 5cf184398ee7
parent 25660 328739ea70c3
child 29175 7bcfb9090c86
permissions -rwxr-xr-x
unshelve: add -k as short form of --keep For parity with strip -k, rebase -k, etc.

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