view tests/readlink.py @ 19906:1dba26575dba

hgweb: remove now unnecessary explicit header() and footer() They became unnecessary after allowing custom-named entries in templates.
author Alexander Plavin <alexander@plav.in>
date Wed, 24 Jul 2013 03:20:26 +0400
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)