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
Labels
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
a4bbc371
Commit
a4bbc371
authored
Nov 27, 2024
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py3: Reduce warnings
parent
7a85f1e3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
master/bt5/slapos_slap_tool/ToolComponentTemplateItem/portal_components/tool.erp5.SlapTool.py
...onentTemplateItem/portal_components/tool.erp5.SlapTool.py
+1
-1
master/product/SlapOS/tests/testSlapOSMixin.py
master/product/SlapOS/tests/testSlapOSMixin.py
+9
-5
No files found.
master/bt5/slapos_slap_tool/ToolComponentTemplateItem/portal_components/tool.erp5.SlapTool.py
View file @
a4bbc371
...
...
@@ -96,7 +96,7 @@ def convertToREST(function):
LOG
(
'SlapTool'
,
INFO
,
'Converting ValueError to NotFound, real error:'
,
error
=
True
)
raise
NotFound
(
log
)
except
SoftwareInstanceNotReady
as
log
:
except
SoftwareInstanceNotReady
:
self
.
REQUEST
.
response
.
setStatus
(
408
)
self
.
REQUEST
.
response
.
setHeader
(
'Cache-Control'
,
'private'
)
return
self
.
REQUEST
.
response
...
...
master/product/SlapOS/tests/testSlapOSMixin.py
View file @
a4bbc371
...
...
@@ -93,8 +93,8 @@ class testSlapOSMixin(ERP5TypeTestCase):
os
.
mkdir
(
os
.
path
.
join
(
ca_path
,
'requests'
))
os
.
mkdir
(
os
.
path
.
join
(
ca_path
,
'newcerts'
))
original_openssl_cnf
=
open
(
o
s
.
path
.
join
(
os
.
environ
[
'TEST_CA_PATH'
],
'openssl.cnf'
),
"r"
)
.
read
()
with
open
(
os
.
path
.
join
(
os
.
environ
[
'TEST_CA_PATH'
],
'openssl.cnf'
),
"r"
)
as
f
:
o
riginal_openssl_cnf
=
f
.
read
()
openssl_cnf_with_updated_path
=
original_openssl_cnf
.
replace
(
os
.
environ
[
'TEST_CA_PATH'
],
ca_path
)
...
...
@@ -113,9 +113,13 @@ class testSlapOSMixin(ERP5TypeTestCase):
os
.
path
.
join
(
ca_path
,
'private'
,
'cakey.pem'
))
# reset test CA to have it always count from 0
open
(
os
.
path
.
join
(
ca_path
,
'serial'
),
'w'
).
write
(
'01'
)
open
(
os
.
path
.
join
(
ca_path
,
'crlnumber'
),
'w'
).
write
(
'01'
)
open
(
os
.
path
.
join
(
ca_path
,
'index.txt'
),
'w'
).
write
(
''
)
with
open
(
os
.
path
.
join
(
ca_path
,
'serial'
),
"w"
)
as
f
:
f
.
write
(
'01'
)
with
open
(
os
.
path
.
join
(
ca_path
,
'index.txt'
),
"w"
)
as
f
:
f
.
write
(
'01'
)
with
open
(
os
.
path
.
join
(
ca_path
,
'crlnumber'
),
"w"
)
as
f
:
f
.
write
(
''
)
private_list
=
glob
.
glob
(
'%s/*.key'
%
os
.
path
.
join
(
ca_path
,
'private'
))
for
private
in
private_list
:
os
.
remove
(
private
)
...
...
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