view tests/readlink.py @ 5764:8a5d8fb59ed2

Backed out changeset c2a21fe60994 Unfortunately, this breaks backward compatibility.
author Matt Mackall <mpm@selenic.com>
date Mon, 31 Dec 2007 17:47:02 -0600
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)