mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-26 23:24:45 +03:00
Replaced exec with getattr
This commit is contained in:
parent
0ac6d6ad52
commit
1fc184cace
|
@ -960,10 +960,11 @@ if __name__ == "__main__":
|
|||
|
||||
print(__doc__)
|
||||
|
||||
for f in dir(sys.modules[__name__]):
|
||||
module = sys.modules[__name__]
|
||||
for f in dir(module):
|
||||
doc = None
|
||||
try:
|
||||
exec("doc = %s.__doc__" % (f))
|
||||
doc = getattr(module, f).__doc__
|
||||
if "pyCMS" in doc:
|
||||
# so we don't get the __doc__ string for imported modules
|
||||
print("=" * 80)
|
||||
|
|
Loading…
Reference in New Issue
Block a user