view tests/readlink.py @ 28042:08e0c4082903

check-commit: wrap too long line This is fixing for 'line too long' check-code rule. check-code has overlooked this, because a file isn't recognized as one to be checked (this problem is fixed by subsequent patch).
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Wed, 10 Feb 2016 22:44:28 +0900
parents 328739ea70c3
children 7bcfb9090c86
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 as err:
        if err.errno != errno.EINVAL:
            raise
        print f, 'not a symlink'

sys.exit(0)