view tests/readlink.py @ 23762:0390cc327dd5

debugnamecomplete: rename from debuglabelcomplete Now that we have decided on the use of 'name' instead of 'label' we rename this function accordingly. The old method 'debuglabelcomplete' has been left as a deprecated command so that current scripts don't break.
author Sean Farley <sean.michael.farley@gmail.com>
date Fri, 17 Oct 2014 13:41:29 -0700
parents 08a0f04b56bd
children 328739ea70c3
line wrap: on
line source

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