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
7
Merge Requests
7
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
Jérome Perrin
erp5
Commits
7406d8b1
Commit
7406d8b1
authored
Apr 07, 2023
by
Valentin Benozillo
Committed by
Kazuhiko Shiozaki
Jul 11, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
product: Add TimeoutReachedError to restricted python
parent
2a78116b
Changes
1
Show 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 @
7406d8b1
...
...
@@ -32,6 +32,8 @@ from AccessControl.SecurityInfo import ModuleSecurityInfo
from
ZPublisher.HTTPResponse
import
status_codes
from
Products.TimerService.timerserver.TimerServer
import
TimerRequest
module_security
=
ModuleSecurityInfo
(
__name__
)
__all__
=
(
'TimeoutReachedError'
,
'Deadline'
,
'getDeadline'
,
'getTimeLeft'
,
'getPublisherDeadlineValue'
,
...
...
@@ -43,6 +45,8 @@ class TimeoutReachedError(Exception):
"""
pass
module_security
.
declarePublic
(
'TimeoutReachedError'
)
# There is no appropriate status code for timeout.
status_codes
[
'timeoutreachederror'
]
=
500
# Internal Server Error
del
status_codes
...
...
@@ -85,7 +89,7 @@ def Deadline(offset):
finally
:
_site_local
.
deadline
=
old_deadline
ModuleSecurityInfo
(
'Products.ERP5Type.Timeout'
)
.
declarePublic
(
'Deadline'
)
module_security
.
declarePublic
(
'Deadline'
)
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