tests/readlink.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 25 Aug 2022 05:12:25 +0200
changeset 49471 cd21f2b4226f
parent 48966 6000f5b25c9b
permissions -rwxr-xr-x
perf: properly process formatter option in perf::unbundle Otherwise, the options are not understood.

#!/usr/bin/env python3


import errno
import os
import 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)