Skip to content

Commit

Permalink
do not load at module time.
Browse files Browse the repository at this point in the history
Otherwise we commit a nice import loop
  • Loading branch information
trolldbois committed Jul 3, 2017
1 parent fe3b932 commit cab9e93
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions haystack/allocators/heapwalker.py
Expand Up @@ -9,10 +9,12 @@

SUPPORTED_ALLOCATORS = {}

# TODO use it in memory dump discovery. Maybe add platform selectors to Finder interface
for entry_point in pkg_resources.iter_entry_points("haystack.heap_finder"):
ep = entry_point.resolve()
SUPPORTED_ALLOCATORS[entry_point.name] = entry_point.resolve()

def _discover_supported_allocators():
# TODO use it in memory dump discovery. Maybe add platform selectors to Finder interface
for entry_point in pkg_resources.iter_entry_points("haystack.heap_finder"):
ep = entry_point.resolve()
SUPPORTED_ALLOCATORS[entry_point.name] = entry_point.resolve()


class HeapWalker(interfaces.IHeapWalker):
Expand Down

0 comments on commit cab9e93

Please sign in to comment.