diff options
author | ankitjavalkar | 2016-03-04 14:55:09 +0530 |
---|---|---|
committer | ankitjavalkar | 2016-05-05 18:57:52 +0530 |
commit | 3b56d8259d6aa8311f86e0561e40d0b17bc62534 (patch) | |
tree | 50e18e5f688fbeb195633073c36f9ce045d32e48 /yaksh/code_server.py | |
parent | 5ec456d5208df78ef87d0660e4bef430d553d65d (diff) | |
download | online_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/code_server.py')
-rwxr-xr-x | yaksh/code_server.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/yaksh/code_server.py b/yaksh/code_server.py index faf9c0d..2762f12 100755 --- a/yaksh/code_server.py +++ b/yaksh/code_server.py @@ -31,7 +31,7 @@ import re import json # Local imports. from settings import SERVER_PORTS, SERVER_POOL_PORT -from language_registry import set_registry, get_registry +from language_registry import get_registry, registry MY_DIR = abspath(dirname(__file__)) @@ -82,9 +82,10 @@ class CodeServer(object): # Private Protocol ########## def _create_evaluator_instance(self, language, json_data, in_dir): """Create instance of relevant EvaluateCode class based on language""" - set_registry() - registry = get_registry() - cls = registry.get_class(language) + # set_registry() + registry1 = get_registry() + print registry + cls = registry1.get_class(language) instance = cls.from_json(language, json_data, in_dir) return instance |