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
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
erp5
Commits
94486be6
Commit
94486be6
authored
Sep 23, 2024
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_antivirus_clammit: limit the timeout to the time left to the zope transaction
parent
f1a8f978
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
bt5/erp5_antivirus_clammit/DocumentTemplateItem/portal_components/document.erp5.ClammitConnector.py
...eItem/portal_components/document.erp5.ClammitConnector.py
+6
-1
No files found.
bt5/erp5_antivirus_clammit/DocumentTemplateItem/portal_components/document.erp5.ClammitConnector.py
View file @
94486be6
...
...
@@ -28,6 +28,7 @@
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type.Timeout
import
getTimeLeft
from
Products.ERP5Type.XMLObject
import
XMLObject
import
requests
...
...
@@ -50,7 +51,11 @@ class ClammitConnector(XMLObject):
def
_request
(
*
args
,
**
kw
):
return
requests
.
request
(
*
args
,
**
kw
)
kw
.
setdefault
(
"timeout"
,
self
.
getTimeout
(
self
.
_DEFAULT_TIMEOUT
))
timeout
=
kw
.
get
(
"timeout"
,
self
.
getTimeout
(
self
.
_DEFAULT_TIMEOUT
))
kw
[
'timeout'
]
=
min
(
getTimeLeft
()
or
timeout
,
timeout
,
)
ca_certificate
=
self
.
getCertificateAuthorityCertificate
()
if
ca_certificate
:
...
...
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