view tests/readlink.py @ 6387:cfa08c88a5c4

Added tag 1.0 for changeset bae2e9c838e9
author Matt Mackall <mpm@selenic.com>
date Mon, 24 Mar 2008 18:05:22 -0500
parents 396c7010b0cd
children 08a0f04b56bd
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)