Mercurial > hg
view tests/readlink.py @ 29466:a0efbfbba7b5
histedit: remove unneeded initial parameter
Now that the autoverb logic no longer acts on an individual rule line,
we don't need this parameter since we apply our logic just once at the
time of initialization.
author | Sean Farley <sean@farley.io> |
---|---|
date | Thu, 26 May 2016 15:43:00 -0700 |
parents | 7bcfb9090c86 |
children | 6a98f9408a50 |
line wrap: on
line source
#!/usr/bin/env python from __future__ import print_function 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, '->', f, 'not a symlink') sys.exit(0)