tests/readlink.py
author Gregory Szorc <gregory.szorc@gmail.com>
Sat, 22 Aug 2015 16:39:29 -0700
changeset 26164 e037fd28c8bb
parent 25660 328739ea70c3
child 29175 7bcfb9090c86
permissions -rwxr-xr-x
hgweb: create websubtable on requestcontext

#!/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)