Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion source/appModuleHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ def cleanup():
log.exception("Error terminating app module %r" % deadMod)

def doesAppModuleExist(name):
return any(importer.find_module("appModules.%s" % name) for importer in _importers)
# #9797: when invoked from system tests, importers list isn't initialized (attribute error on a None object), thus assume no app module exists.
try:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would prefer just to check if _importers is None and return False, rather than letting it knowingly fail.
Though I'd like to also understand why systemTestSpy actually causes doesAppModule exist to be called? can you provide an example traceback on the issue?

return any(importer.find_module("appModules.%s" % name) for importer in _importers)
except AttributeError:
return False

def fetchAppModule(processID,appName):
"""Returns an appModule found in the appModules directory, for the given application name.
Expand Down