Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 205003 Details for
Bug 282184
[PATCH] dev-python/myghty-1.1 does not work with Python 2.6
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Python 2.6 patch for Myghty 1.1
myghty-1.1-python-2.6.patch (text/plain), 1009 bytes, created by
Sebastian Pipping
on 2009-09-23 11:07:17 UTC
(
hide
)
Description:
Python 2.6 patch for Myghty 1.1
Filename:
MIME Type:
Creator:
Sebastian Pipping
Created:
2009-09-23 11:07:17 UTC
Size:
1009 bytes
patch
obsolete
>--- lib/myghty/importer.py >+++ lib/myghty/importer.py >@@ -47,11 +47,20 @@ > > # 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): >- try: >- return modules[name].module >- except KeyError: >- return builtin_importer(name, globals, locals, fromlist) >+if sys.version_info >= (2, 5): >+ def import_module(name, globals = None, locals = None, fromlist = None, level = -1): >+ if level == -1: >+ try: >+ return modules[name].module >+ except KeyError: >+ pass >+ return builtin_importer(name, globals, locals, fromlist, level) >+else: >+ def import_module(name, globals = None, locals = None, fromlist = None): >+ try: >+ return modules[name].module >+ except KeyError: >+ return builtin_importer(name, globals, locals, fromlist) > > __builtin__.__import__ = import_module >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 282184
: 205003