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
Léo-Paul Géneau
slapos.core
Commits
b66f584e
Commit
b66f584e
authored
Apr 25, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
truth testing cleanup
parent
225e6d79
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
14 deletions
+11
-14
slapos/grid/SlapObject.py
slapos/grid/SlapObject.py
+3
-4
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+6
-8
slapos/grid/utils.py
slapos/grid/utils.py
+2
-2
No files found.
slapos/grid/SlapObject.py
View file @
b66f584e
...
...
@@ -119,9 +119,8 @@ class Software(object):
else
:
self
.
_install_from_buildout
()
# Upload to binary cache if possible and allowed
if
(
self
.
software_root
and
self
.
url
and
self
.
software_url_hash
\
and
self
.
upload_binary_cache_url
\
and
self
.
upload_binary_dir_url
):
if
all
([
self
.
software_root
,
self
.
url
,
self
.
software_url_hash
,
self
.
upload_binary_cache_url
,
self
.
upload_binary_dir_url
]):
blacklisted
=
False
for
url
in
self
.
upload_to_binary_cache_url_blacklist
:
if
self
.
url
.
startswith
(
url
):
...
...
@@ -159,7 +158,7 @@ class Software(object):
if
(
self
.
signature_private_key_file
or
self
.
upload_cache_url
or
self
.
upload_dir_url
is
not
None
):
self
.
upload_dir_url
):
buildout_parameter_list
.
append
(
'buildout:networkcache-section=networkcache'
)
for
buildout_option
,
value
in
[
(
'%ssignature-private-key-file=%s'
,
self
.
signature_private_key_file
),
...
...
slapos/grid/slapgrid.py
View file @
b66f584e
...
...
@@ -194,7 +194,7 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
if
not
mandatory_parameter
in
options
:
missing_mandatory_parameter_list
.
append
(
mandatory_parameter
)
if
options
.
get
(
'all'
)
is
True
:
if
options
.
get
(
'all'
):
options
[
'develop'
]
=
True
if
options
.
get
(
'maximum_periodicity'
)
is
not
None
:
...
...
@@ -238,7 +238,7 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
parser
.
error
(
'File %r does not exist.'
%
f
)
certificate_repository_path
=
options
.
get
(
'certificate_repository_path'
)
if
certificate_repository_path
is
not
None
:
if
certificate_repository_path
:
if
not
os
.
path
.
isdir
(
certificate_repository_path
):
parser
.
error
(
'Directory %r does not exist'
%
certificate_repository_path
)
...
...
@@ -324,12 +324,10 @@ def parseArgumentTupleAndReturnSlapgridObject(*argument_tuple):
shadir_cert_file
=
options
.
get
(
'shadir-cert-file'
,
None
),
shadir_key_file
=
options
.
get
(
'shadir-key-file'
,
None
),
develop
=
options
.
get
(
'develop'
,
False
),
software_release_filter_list
=
options
.
get
(
'only-sr'
,
# Try to fetch from deprecated argument
options
.
get
(
'only_sr'
,
None
)),
computer_partition_filter_list
=
options
.
get
(
'only-cp'
,
# Try to fetch from deprecated argument
options
.
get
(
'only_cp'
,
None
)),
# Try to fetch from deprecated argument
software_release_filter_list
=
options
.
get
(
'only-sr'
,
options
.
get
(
'only_sr'
,
None
)),
# Try to fetch from deprecated argument
computer_partition_filter_list
=
options
.
get
(
'only-cp'
,
options
.
get
(
'only_cp'
,
None
)),
force_periodicity
=
options
.
get
(
'force_periodicity'
,
False
),
maximum_periodicity
=
options
.
get
(
'maximum_periodicity'
,
86400
),
),
...
...
slapos/grid/utils.py
View file @
b66f584e
...
...
@@ -108,7 +108,7 @@ class SlapPopen(subprocess.Popen):
output_lines
=
[]
while
True
:
line
=
self
.
stdout
.
readline
()
if
line
==
''
and
self
.
poll
()
!=
None
:
if
line
==
''
and
self
.
poll
()
is
not
None
:
break
output_lines
.
append
(
line
)
logger
.
info
(
line
.
rstrip
(
'
\
n
'
))
...
...
@@ -189,7 +189,7 @@ def dropPrivileges(uid, gid):
if
uid
==
0
or
gid
==
0
:
raise
OSError
(
'Dropping privileges to uid = %r or '
\
'gid = %r is too dangerous'
%
(
uid
,
gid
))
if
not
(
current_uid
==
0
and
current_gid
==
0
)
:
if
current_uid
or
current_gid
:
logger
.
debug
(
'Running as uid = %r, gid = %r, dropping not needed and not '
'possible'
%
(
current_uid
,
current_gid
))
return
...
...
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