Mercurial > hg
view tests/readlink.py @ 27975:6f92d6bd2972 stable
rebase: backout changeset 986d04b9fedd
This is a dependency for a future backout of 88fde8db5307.
See the previous patches for why.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Wed, 03 Feb 2016 09:23:52 -0800 |
parents | 328739ea70c3 |
children | 7bcfb9090c86 |
line wrap: on
line source
#!/usr/bin/env python import errno, os, 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, 'not a symlink' sys.exit(0)