Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
139
Merge Requests
139
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
7b4ed528
Commit
7b4ed528
authored
Apr 07, 2023
by
Valentin Benozillo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
product: Add TimeoutReachedError to restricted python
parent
15e46bc7
Pipeline
#27602
failed with stage
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
product/ERP5Type/Timeout.py
product/ERP5Type/Timeout.py
+5
-1
No files found.
product/ERP5Type/Timeout.py
View file @
7b4ed528
...
@@ -32,6 +32,8 @@ from AccessControl.SecurityInfo import ModuleSecurityInfo
...
@@ -32,6 +32,8 @@ from AccessControl.SecurityInfo import ModuleSecurityInfo
from
ZPublisher.HTTPResponse
import
status_codes
from
ZPublisher.HTTPResponse
import
status_codes
from
Products.TimerService.timerserver.TimerServer
import
TimerRequest
from
Products.TimerService.timerserver.TimerServer
import
TimerRequest
module_security
=
ModuleSecurityInfo
(
__name__
)
__all__
=
(
__all__
=
(
'TimeoutReachedError'
,
'Deadline'
,
'getDeadline'
,
'getTimeLeft'
,
'TimeoutReachedError'
,
'Deadline'
,
'getDeadline'
,
'getTimeLeft'
,
'getPublisherDeadlineValue'
,
'getPublisherDeadlineValue'
,
...
@@ -43,6 +45,8 @@ class TimeoutReachedError(Exception):
...
@@ -43,6 +45,8 @@ class TimeoutReachedError(Exception):
"""
"""
pass
pass
module_security
.
declarePublic
(
'TimeoutReachedError'
)
# There is no appropriate status code for timeout.
# There is no appropriate status code for timeout.
status_codes
[
'timeoutreachederror'
]
=
500
# Internal Server Error
status_codes
[
'timeoutreachederror'
]
=
500
# Internal Server Error
del
status_codes
del
status_codes
...
@@ -85,7 +89,7 @@ def Deadline(offset):
...
@@ -85,7 +89,7 @@ def Deadline(offset):
finally
:
finally
:
_site_local
.
deadline
=
old_deadline
_site_local
.
deadline
=
old_deadline
ModuleSecurityInfo
(
'Products.ERP5Type.Timeout'
)
.
declarePublic
(
'Deadline'
)
module_security
.
declarePublic
(
'Deadline'
)
def
getDeadline
():
def
getDeadline
():
"""
"""
...
...
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