Mercurial > hg
view tests/readlink.py @ 49524:45268599f55e stable
tests: add another variation of EADDRNOTAVAIL message (e.g. from NetBSD)
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Wed, 19 Oct 2022 16:55:46 +0400 |
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)