tests/readlink.py
author liscju <piotr.listkiewicz@gmail.com>
Tue, 10 May 2016 15:14:41 +0200
changeset 29315 2143266ecb65
parent 29175 7bcfb9090c86
child 29485 6a98f9408a50
permissions -rwxr-xr-x
py3: make largefiles/uisetup.py use absolute_import

#!/usr/bin/env python

from __future__ import print_function

import errno, os, sys

for f in sys.argv[1:]:
    try:
        print(f, '->', os.readlink(f))
    except OSError as err:
        if err.errno != errno.EINVAL:
            raise
        print(f, '->', f, 'not a symlink')

sys.exit(0)