[Checkins] SVN: martian/branches/paw-manuel-fake-module/src/martian/ Updated such that all tests now pass.
Paul Wilson
paulalexwilson at gmail.com
Thu Mar 4 15:25:05 EST 2010
Log message for revision 109657:
Updated such that all tests now pass.
Problems arose out of the fact that
martian was scanning the __builtin__ namespace
for context directives.
Changed:
U martian/branches/paw-manuel-fake-module/src/martian/context.py
U martian/branches/paw-manuel-fake-module/src/martian/directive.py
-=-
Modified: martian/branches/paw-manuel-fake-module/src/martian/context.py
===================================================================
--- martian/branches/paw-manuel-fake-module/src/martian/context.py 2010-03-04 19:49:14 UTC (rev 109656)
+++ martian/branches/paw-manuel-fake-module/src/martian/context.py 2010-03-04 20:25:04 UTC (rev 109657)
@@ -1,5 +1,6 @@
from martian.directive import UnknownError
from martian.util import scan_for_classes
+import __builtin__
class GetDefaultComponentFactory(object):
def __init__(self, iface, component_name, directive_name):
Modified: martian/branches/paw-manuel-fake-module/src/martian/directive.py
===================================================================
--- martian/branches/paw-manuel-fake-module/src/martian/directive.py 2010-03-04 19:49:14 UTC (rev 109656)
+++ martian/branches/paw-manuel-fake-module/src/martian/directive.py 2010-03-04 20:25:04 UTC (rev 109657)
@@ -132,8 +132,8 @@
"""
error = None
for base in mro:
- if base is object:
- continue
+ if base.__module__ is '__builtin__' or base is object:
+ break
module_of_base = scan.resolve(base.__module__)
try:
if util.is_baseclass(base):
@@ -191,8 +191,8 @@
mro = inspect.getmro(component)
# look up module-level directive for this class or its bases
for base in mro:
- if base is object:
- continue
+ if base.__module__ is '__builtin__' or base is object:
+ break
module_of_base = scan.resolve(base.__module__)
result = directive.store.get(directive, module_of_base,
_USE_DEFAULT)
More information about the checkins
mailing list