WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

Commit b0cb54f5 authored by Philip Jenvey's avatar Philip Jenvey
Browse files

more cleanup

parent 37812027
......@@ -94,22 +94,13 @@ def _classdir(klass):
recursively.
"""
names = set()
try:
names.update(klass.__dict__)
except AttributeError:
pass
try:
# XXX - Use of .__mro__ would be suggested, if the existance of
# that attribute could be guarranted.
bases = klass.__bases__
except AttributeError:
pass
else:
try:
# Note that since we are only interested in the keys, the
# order we merge classes is unimportant
for base in bases:
names.update(_classdir(base))
except TypeError:
pass
ns = getattr(klass, '__dict__', None)
if ns is not None:
names.update(ns)
bases = getattr(klass, '__bases__', None)
if bases is not None:
# Note that since we are only interested in the keys, the order
# we merge classes is unimportant
for base in bases:
names.update(_classdir(base))
return names
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment