diff options
Diffstat (limited to 'yaksh/language_registry.py')
-rw-r--r-- | yaksh/language_registry.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/yaksh/language_registry.py b/yaksh/language_registry.py index 76a23d7..ee311ec 100644 --- a/yaksh/language_registry.py +++ b/yaksh/language_registry.py @@ -3,11 +3,18 @@ import importlib registry = None -def set_registry(): +# def set_registry(): +# global registry +# registry = _LanguageRegistry() + +def _set_registry(): global registry - registry = _LanguageRegistry() + if registry is None: + registry = _LanguageRegistry() + return registry def get_registry(): + registry = _set_registry() return registry class _LanguageRegistry(object): |