tests/readlink.py
author Martin Geisler <mg@lazybytes.net>
Wed, 09 Nov 2011 18:26:54 +0100
branchstable
changeset 15465 d8238600265d
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
i18n-ru: fix translation of --logfile (issue3095)

#!/usr/bin/env python

import errno, os, sys

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

sys.exit(0)