tests/readlink.py
author Yuya Nishihara <yuya@tcha.org>
Wed, 09 Mar 2016 23:57:15 +0900
changeset 28428 6a4a4ca21907
parent 25660 328739ea70c3
child 29175 7bcfb9090c86
permissions -rwxr-xr-x
graphlog: bring back color to node symbol template Follows up 3356bf61fa25. A ui object is required to render labels.

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