Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
slapos.core
Commits
264ca512
Commit
264ca512
authored
Dec 04, 2020
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Plain Diff
Don't reset PYTHONPATH
With
slapos!862
we no longer need this See merge request
!270
parents
49f8aaa5
c83bb10e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
15 deletions
+1
-15
slapos/slap/standalone.py
slapos/slap/standalone.py
+0
-13
slapos/testing/utils.py
slapos/testing/utils.py
+1
-2
No files found.
slapos/slap/standalone.py
View file @
264ca512
...
...
@@ -711,7 +711,6 @@ class StandaloneSlapOS(object):
return
subprocess
.
check_call
(
command
,
shell
=
True
,
env
=
self
.
_getSubprocessEnvironment
(),
)
except
subprocess
.
CalledProcessError
as
e
:
if
e
.
returncode
==
SLAPGRID_PROMISE_FAIL
:
...
...
@@ -775,7 +774,6 @@ class StandaloneSlapOS(object):
output
=
subprocess
.
check_output
(
[
'supervisord'
,
'--configuration'
,
self
.
_supervisor_config
],
cwd
=
self
.
_base_directory
,
env
=
self
.
_getSubprocessEnvironment
(),
)
self
.
_logger
.
debug
(
"Started new supervisor: %s"
,
output
)
...
...
@@ -806,14 +804,3 @@ class StandaloneSlapOS(object):
return
time
.
sleep
(
i
*
.
01
)
raise
RuntimeError
(
"SlapOS not started"
)
def
_getSubprocessEnvironment
(
self
):
# Running tests with `python setup.py test` sets a PYTHONPATH that
# is suitable for current python, but problematic when this process
# runs another version of python in subprocess.
if
'PYTHONPATH'
in
os
.
environ
:
self
.
_logger
.
warning
(
"Removing $PYTHONPATH from environment for subprocess"
)
env
=
os
.
environ
.
copy
()
del
env
[
'PYTHONPATH'
]
return
env
slapos/testing/utils.py
View file @
264ca512
...
...
@@ -219,8 +219,7 @@ class CrontabMixin(object):
"""
crontab_command
=
self
.
_getCrontabCommand
(
crontab_name
)
crontab_output
=
subprocess
.
check_output
(
# XXX we unset PYTHONPATH set by `setup.py test`
"env PYTHONPATH= faketime {date} bash -o pipefail -e -c '{crontab_command}'"
.
format
(
**
locals
()),
"faketime {date} bash -o pipefail -e -c '{crontab_command}'"
.
format
(
**
locals
()),
shell
=
True
,
)
self
.
logger
.
debug
(
"crontab %s output: %s"
,
crontab_command
,
crontab_output
)
...
...
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