Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
d9df65ee
Commit
d9df65ee
authored
Feb 25, 2013
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some logging to codejail
parent
771de938
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
common/lib/codejail/codejail/jailpy.py
+5
-0
No files found.
common/lib/codejail/codejail/jailpy.py
View file @
d9df65ee
...
...
@@ -3,6 +3,7 @@
# Instructions:
# - AppArmor.md from xserver
import
logging
import
os
,
os
.
path
import
resource
import
shutil
...
...
@@ -13,6 +14,8 @@ import time
from
.util
import
temp_directory
log
=
logging
.
getLogger
(
__name__
)
# TODO: limit too much stdout data?
# Configure the Python command
...
...
@@ -61,6 +64,8 @@ def jailpy(code, files=None, argv=None, stdin=None):
with
temp_directory
(
delete_when_done
=
True
)
as
tmpdir
:
log
.
debug
(
"Executing jailed code:
%
r"
,
code
)
# All the supporting files are copied into our directory.
for
filename
in
files
or
():
if
os
.
path
.
isfile
(
filename
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment