tests/readlink.py
author Greg Ward <greg@gerg.ca>
Sat, 22 Oct 2011 13:48:56 -0400
branchstable
changeset 15338 f4b29792fcda
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
largefiles: extract test-lfconvert.t from test-largefiles.t test-largefiles.t is getting pretty big, and there's lots more to test in lfconvert. And lfconvert is a fairly orthogonal feature to the rest of largefiles.

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