tests/readlink.py
author Thomas Arendsen Hein <thomas@intevation.de>
Fri, 07 Nov 2008 13:22:41 +0100
changeset 7331 650e9d6988cb
parent 5683 396c7010b0cd
child 10282 08a0f04b56bd
permissions -rwxr-xr-x
Keep sessionvars with repository links added in a0843c82d1a2 Without this, e.g. "?style=coal" would be dropped.

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