tests/readlink.py
author Anton Shestakov <av6@dwimlabs.net>
Thu, 10 Mar 2016 23:46:19 +0800
changeset 28457 e6310cdcc4d0
parent 25660 328739ea70c3
child 29175 7bcfb9090c86
permissions -rwxr-xr-x
dockerdeb: add Ubuntu Trusty One problem reported by lintian is "bad-distribution-in-changes-file unstable" in changelog, but the current changelog for the official package in Ubuntu also uses that distribution name (unstable), because they import from Debian. This certainly doesn't stop the build process.

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