summaryrefslogtreecommitdiff
path: root/server/problems.py
diff options
context:
space:
mode:
Diffstat (limited to 'server/problems.py')
-rw-r--r--server/problems.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/problems.py b/server/problems.py
index 220a746..bc124ca 100644
--- a/server/problems.py
+++ b/server/problems.py
@@ -5,6 +5,7 @@ import importlib.machinery
import threading
import os.path
from db import get_connection, return_connection
+import logging
_path_prefix = os.environ.get('CODEQ_PROBLEMS') or '/var/local/codeq-problems'
_module_loading_lock = threading.RLock() # TODO: make a more fine-grained locking import machinery
@@ -19,7 +20,7 @@ def load_module(fullname):
ff = importlib.machinery.FileFinder(d, (importlib.machinery.SourceFileLoader, ['.py']))
spec = ff.find_spec(fullname)
if spec is None:
- print('ERROR: there is no problem module {0}'.format(fullname))
+ logging.error('ERROR: there is no problem module {0}'.format(fullname))
return None
mod = type(sys)(fullname)
mod.__loader__ = spec.loader