summaryrefslogtreecommitdiff
path: root/yaksh/language_registry.py
diff options
context:
space:
mode:
authorankitjavalkar2016-03-04 14:55:09 +0530
committerankitjavalkar2016-05-05 18:57:52 +0530
commit3b56d8259d6aa8311f86e0561e40d0b17bc62534 (patch)
tree50e18e5f688fbeb195633073c36f9ce045d32e48 /yaksh/language_registry.py
parent5ec456d5208df78ef87d0660e4bef430d553d65d (diff)
downloadonline_test-3b56d8259d6aa8311f86e0561e40d0b17bc62534.tar.gz
online_test-3b56d8259d6aa8311f86e0561e40d0b17bc62534.tar.bz2
online_test-3b56d8259d6aa8311f86e0561e40d0b17bc62534.zip
Language registry altered, Name cleanup:
- set_registry will only act when registry is None - _setup, _teardown and _check_code are setup,teardown,check_code - Corresponding name changes in evaluator modules
Diffstat (limited to 'yaksh/language_registry.py')
-rw-r--r--yaksh/language_registry.py11
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):