tests/readlink.py
author David Soria Parra <dsp@php.net>
Wed, 23 Feb 2011 00:25:01 +0100
branchstable
changeset 13462 8641cb094c81
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
hgk: display bookmarks as gray labels in the commitline

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