Mercurial > hg
view tests/readlink.py @ 52295:f90796d33aa0
rust: fix clippy lints
These were highlighted by the latest version of clippy (1.82.0).
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Tue, 29 Oct 2024 11:35:01 +0100 |
parents | 6000f5b25c9b |
children |
line wrap: on
line source
#!/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)