From: Guido van Rossum Date: Fri, 6 Mar 1998 19:55:10 +0000 (+0000) Subject: Always set the __file__ attribute, so dynamic link modules are indicated. X-Git-Tag: v1.5.1~478 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab045f952cee898c01f181105bb9f346e9338852;p=python Always set the __file__ attribute, so dynamic link modules are indicated. --- diff --git a/Tools/freeze/modulefinder.py b/Tools/freeze/modulefinder.py index 8dce01d9df..3aa69410a6 100644 --- a/Tools/freeze/modulefinder.py +++ b/Tools/freeze/modulefinder.py @@ -229,8 +229,8 @@ class ModuleFinder: else: co = None m = self.add_module(fqname) + m.__file__ = pathname if co: - m.__file__ = pathname m.__code__ = co self.scan_code(co, m) self.msgout(2, "load_module ->", m)