tests/readlink.py
author timeless@mozdev.org
Thu, 17 Sep 2015 07:49:18 -0400
changeset 26261 8fb92ff63ccf
parent 25660 328739ea70c3
child 29175 7bcfb9090c86
permissions -rwxr-xr-x
tests: check for inconsistently translated DEPRECATED Mercurial expects DEPRECATED to be translated consistently, not doing that breaks Mercurial.

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