summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/problems.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/problems.py b/server/problems.py
index fed9e77..f6f4e45 100644
--- a/server/problems.py
+++ b/server/problems.py
@@ -3,6 +3,7 @@
import sys
import importlib.machinery
import threading
+import os.path
from db import get_connection, return_connection
#sys.path.append('/home/aless/job/codeq/source/codeq-problems/')
@@ -15,7 +16,7 @@ def load_module(fullname):
mod = sys.modules.get(fullname, None)
if mod is None:
parts = fullname.split('.')
- d = _path_prefix + '/'.join(parts[0:-1])
+ d = os.path.join(_path_prefix, *parts[:-1])
ff = importlib.machinery.FileFinder(d, (importlib.machinery.SourceFileLoader, ['.py']))
spec = ff.find_spec(fullname)
mod = type(sys)(fullname)