Mercurial > hg
view tests/readlink.py @ 26600:e8497889edab
setup: import setup from setuptools if FORCE_SETUPTOOLS is set
This should allow easier experimentation with using setuptools in mercurial's
build automation, without breaking anything that currently depends on distutils
behavior
author | Nathan Goldbaum <ngoldbau@ucsc.edu> |
---|---|
date | Fri, 09 Oct 2015 12:25:51 -0500 |
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)