tests/readlink.py
author Erik Zielke <ez@aragost.com>
Tue, 28 Sep 2010 13:09:22 +0200
changeset 12588 41fa32a6b6f8
parent 10282 08a0f04b56bd
child 25660 328739ea70c3
permissions -rwxr-xr-x
test-subrepo-recursion: deleted default arguments Deleted default arguments from test-sub-repo-recursion. Rationale is that it is confusing to read, when the arguments aren't at each command in the test

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