tests/readlink.py
author Augie Fackler <augie@google.com>
Wed, 04 May 2016 22:44:30 -0400
branchstable
changeset 29066 e6f490e32863
parent 25660 328739ea70c3
child 29175 7bcfb9090c86
permissions -rwxr-xr-x
bookmarks: properly invalidate volatile sets when writing bookmarks This corrects a regression introduced during the 3.7 cycle, but which went undetected due to the surviving-but-deprecated write() method on bmstore.

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