tests/readlink.py
author Kostia Balytskyi <ikostia@fb.com>
Tue, 21 Jun 2016 06:29:23 -0700
changeset 29401 87acd047711e
parent 29175 7bcfb9090c86
child 29485 6a98f9408a50
permissions -rwxr-xr-x
rebase: move local variables 'date' and 'extrafns' to the RR class This commit moves the following variables, local to the rebase function to be fields of the rebaseruntime: -date -extrafns

#!/usr/bin/env python

from __future__ import print_function

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, '->', f, 'not a symlink')

sys.exit(0)