summaryrefslogtreecommitdiff
path: root/yaksh/base_evaluator.py
diff options
context:
space:
mode:
authoradityacp2018-05-24 12:07:39 +0530
committeradityacp2018-06-07 14:50:47 +0530
commit97b657edc2a323f832c81f0e34ce5761bd21f7e9 (patch)
tree09f4367f813fab99ffa8cd540d246cfc8c8fa00a /yaksh/base_evaluator.py
parent78ce1804d3a82327aa0da1510bb5c03d6bbff3ba (diff)
downloadonline_test-97b657edc2a323f832c81f0e34ce5761bd21f7e9.tar.gz
online_test-97b657edc2a323f832c81f0e34ce5761bd21f7e9.tar.bz2
online_test-97b657edc2a323f832c81f0e34ce5761bd21f7e9.zip
Pep8 changes
Diffstat (limited to 'yaksh/base_evaluator.py')
-rw-r--r--yaksh/base_evaluator.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/yaksh/base_evaluator.py b/yaksh/base_evaluator.py
index e702f68..567d5ad 100644
--- a/yaksh/base_evaluator.py
+++ b/yaksh/base_evaluator.py
@@ -1,20 +1,19 @@
#!/usr/bin/env python
from __future__ import unicode_literals
-import traceback
-import pwd
import os
-from os.path import join, isfile
-from os.path import isdir, dirname, abspath, join, isfile, exists
+from os.path import abspath, exists
import subprocess
import stat
import signal
# Local imports
-from .grader import MY_DIR, TimeoutException
+from .grader import TimeoutException
+
class BaseEvaluator(object):
- """Base Evaluator class containing generic attributes and callable methods"""
+ """Base Evaluator class containing generic attributes
+ and callable methods"""
def __init__(self):
pass
@@ -31,7 +30,8 @@ class BaseEvaluator(object):
stdout and stderr.
"""
try:
- proc = subprocess.Popen(cmd_args,preexec_fn=os.setpgrp, *args, **kw)
+ proc = subprocess.Popen(cmd_args,
+ preexec_fn=os.setpgrp, *args, **kw)
stdout, stderr = proc.communicate()
except TimeoutException:
# Runaway code, so kill it.
@@ -64,6 +64,6 @@ class BaseEvaluator(object):
submit_f.close()
def _set_file_as_executable(self, fname):
- os.chmod(fname, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR
- | stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP
- | stat.S_IROTH | stat.S_IWOTH | stat.S_IXOTH)
+ os.chmod(fname, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR |
+ stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP | stat.S_IROTH |
+ stat.S_IWOTH | stat.S_IXOTH)