tests/readlink.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 09 Apr 2024 14:41:48 +0200
changeset 51575 f610d705c3ca
parent 48875 6000f5b25c9b
permissions -rwxr-xr-x
bundlespec: drop unused _bundlespecvariants dictionary Why do we have a `_bundlespecvariants`?

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