/usr/lib/python2.7/dist-packages/chameleon/py26.py is in python-chameleon 2.16-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import sys
def lookup_attr(obj, key):
try:
return getattr(obj, key)
except AttributeError:
exc = sys.exc_info()[1]
try:
get = obj.__getitem__
except AttributeError:
raise exc
try:
return get(key)
except KeyError:
raise exc
|