tests/readlink.py
author Matt Harbison <matt_harbison@yahoo.com>
Mon, 21 Aug 2023 17:35:13 -0400
changeset 50975 8f25df137282
parent 48966 6000f5b25c9b
permissions -rwxr-xr-x
debugrevlog: migrate `opts` to native kwargs

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