Mercurial > hg
view tests/readlink.py @ 20547:9d9f8ccffead
hooks: move logging of hook name to after we have found the hook
We do not expect the finding process to take a significant amount of time - it
is the execution time of the hook we care about.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Sat, 15 Feb 2014 01:23:12 +0100 |
parents | 08a0f04b56bd |
children | 328739ea70c3 |
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, err: if err.errno != errno.EINVAL: raise print f, 'not a symlink' sys.exit(0)