tests/readlink.py
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Fri, 11 Mar 2016 04:14:54 +0900
changeset 28446 08bd09921102
parent 25660 328739ea70c3
child 29175 7bcfb9090c86
permissions -rwxr-xr-x
registrar: remove useless base classes (API) Previous patches make these classes useless by removing classes derived from them.

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