Skip to content

Commit

Permalink
Updated such that all tests now pass.
Browse files Browse the repository at this point in the history
Problems arose out of the fact that 
martian was scanning the __builtin__ namespace
for context directives.
  • Loading branch information
paulalexwilson committed Mar 4, 2010
1 parent 0a02ce9 commit 38618a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/martian/context.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
8 changes: 4 additions & 4 deletions src/martian/directive.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ def _default(mro, get_default):
"""
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):
Expand Down Expand Up @@ -191,8 +191,8 @@ def get(self, directive, component, get_default):
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)
Expand Down

0 comments on commit 38618a0

Please sign in to comment.