tests/readlink.py
author Chris Jerdonek <chris.jerdonek@gmail.com>
Sun, 22 Dec 2013 21:27:00 -0800
changeset 20199 d87ed25733a1
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
import-checker: backout 40f79b9a2cc8 (issue4129) This patch backs out 40f79b9a2cc8, which caused test-module-imports.t to be skipped when the test was run using virtualenv. Since the test now passes when using virtualenv, the skip is no longer necessary.

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