tags 571498 + patch
thanks

* Jakub Wilk <jw...@debian.org>, 2010-02-25, 19:37:
| Traceback (most recent call last):
|   File "./genhtml.py", line 13, in <module>
|     import documentgen
|   File "./lib/documentgen.py", line 2, in <module>
|     import myghty.interp
|   File "../lib/myghty/interp.py", line 22, in <module>
|     import myghty.request
|   File "../lib/myghty/importer.py", line 54, in import_module
|     return builtin_importer(name, globals, locals, fromlist)
|   File "../lib/myghty/request.py", line 22, in <module>
|     from myghty.container import CreationAbortedError
|   File "../lib/myghty/importer.py", line 54, in import_module
|     return builtin_importer(name, globals, locals, fromlist)
|   File "../lib/myghty/container.py", line 15, in <module>
|     import cPickle
|   File "../lib/myghty/importer.py", line 54, in import_module
|     return builtin_importer(name, globals, locals, fromlist)
| TypeError: import_module() takes at most 4 arguments (5 given)

The attached patch fixes this bug

--
Jakub Wilk
diff -Nru myghty-1.1/debian/control myghty-1.1/debian/control
--- myghty-1.1/debian/control	2010-02-28 17:10:11.000000000 +0000
+++ myghty-1.1/debian/control	2010-02-28 17:00:48.000000000 +0000
@@ -6,7 +6,7 @@
 Build-Depends: debhelper (>= 5)
 Build-Depends-Indep: python-all, python-support (>= 0.6.4), python-setuptools (>= 0.6b3-1~)
 Standards-Version: 3.8.4
-XS-Python-Version: all
+XS-Python-Version: >= 2.5
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/myghty/trunk/
 Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/myghty/trunk/
 Homepage: http://www.myghty.org/
diff -Nru myghty-1.1/lib/myghty/importer.py myghty-1.1/lib/myghty/importer.py
--- myghty-1.1/lib/myghty/importer.py	2006-09-10 19:32:32.000000000 +0000
+++ myghty-1.1/lib/myghty/importer.py	2010-02-28 17:00:40.000000000 +0000
@@ -47,11 +47,11 @@
 
 # override __import__ to look in our own local module dict first
 builtin_importer = __builtin__.__import__
-def import_module(name, globals = None, locals = None, fromlist = None):
+def import_module(name, globals = None, locals = None, fromlist = None, level = -1):
     try:
         return modules[name].module
     except KeyError:
-        return builtin_importer(name, globals, locals, fromlist)
+        return builtin_importer(name, globals, locals, fromlist, level = -1)
 
 __builtin__.__import__ = import_module
 

Attachment: signature.asc
Description: Digital signature

Reply via email to