tests/readlink.py
author Pulkit Goyal <7895pulkit@gmail.com>
Fri, 06 May 2016 21:48:17 +0530
changeset 29123 0e6b5a5aca22
parent 25660 328739ea70c3
child 29175 7bcfb9090c86
permissions -rwxr-xr-x
py3: make hgext/graphlog.py use absolute_import

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