tests/readlink.py
author Matt Harbison <matt_harbison@yahoo.com>
Fri, 04 Oct 2024 01:29:45 -0400
changeset 51951 737423ae03c2
parent 48875 6000f5b25c9b
permissions -rwxr-xr-x
run-tests: bump the minimum python to 3.8 Presumably this was an oversight when hg was updated to 3.8.

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