tests/readlink.py
author timeless <timeless@mozdev.org>
Sun, 14 Feb 2016 07:35:50 +0000
changeset 28359 f6b5b041c6c9
parent 25660 328739ea70c3
child 29175 7bcfb9090c86
permissions -rwxr-xr-x
commit: block amend while histedit is in progress (issue4800)

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