Mercurial > hg
view tests/readlink.py @ 5855:a6ccb957fd07
Solaris compatibility fixes for test-keyword:
- do not use /bin/false (yields 255 instead of 1)
- do not use "cd -", simply use "cd .." instead.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Mon, 14 Jan 2008 09:00:23 +0100 |
parents | 396c7010b0cd |
children | 08a0f04b56bd |
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)