tests/readlink.py
author Pierre-Yves David <pierre-yves.david@logilab.fr>
Sat, 28 Jul 2012 12:28:35 +0200
branchstable
changeset 17293 d3f84ccc5495
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
pushkey: add more verbose debug output regarding pushkey Very few data are displayed now, making it hard to debug phases and obsolete related issues.

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