Set module.__loader__ as per PEP 302.
authorJohan Dahlin <jdahlin@async.com.br>
Fri, 7 Nov 2008 17:49:33 +0000 (17:49 +0000)
committerJohan Dahlin <johan@src.gnome.org>
Fri, 7 Nov 2008 17:49:33 +0000 (17:49 +0000)
2008-11-07  Johan Dahlin  <jdahlin@async.com.br>

    * giscanner/libtoolimporter.py
    (LibtoolImporter.load_module): Set module.__loader__ as per PEP 302.

svn path=/trunk/; revision=870

ChangeLog
giscanner/libtoolimporter.py

index fe2fde4..1310536 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
        up some confusion about the second argument to find_module, it's
        actually the packages __path__ attribute which we can safely ignore
        for our purposes.
+       (LibtoolImporter.load_module): Set module.__loader__ as per PEP 302.
 
 2008-11-07  Owen Taylor  <otaylor@redhat.com>
 
index 968b935..e149ec4 100644 (file)
@@ -51,6 +51,7 @@ class LibtoolImporter(object):
         realpath = extract_libtool(self.path)
         mod = imp.load_module(name, open(realpath), realpath,
                               ('.so', 'rb', 3))
+        mod.__loader__ = self
         return mod
 
     @classmethod