view tests/readlink.py @ 19858:4a8c5a51f7a1

hgweb: add parentSelector argument to process_dates Allow specifying parent selector of elements to process, useful for incremental page updates.
author Alexander Plavin <alexander@plav.in>
date Fri, 06 Sep 2013 13:30:58 +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)