tests/readlink.py
author timeless@mozdev.org
Fri, 28 Aug 2015 13:57:20 -0400
changeset 26173 0f14c40a05c4
parent 25660 328739ea70c3
child 29175 7bcfb9090c86
permissions -rwxr-xr-x
test-strip: fix spelling of initialization (en-US)

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