Commit 2c8868fe authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Preparation of erp5_base migration from FS: Fix pylint...

ZODB Components: Preparation of erp5_base migration from FS: Fix pylint undefined-variable errors: ResourceLockedError.
parent 28595988
......@@ -219,6 +219,7 @@ class Coordinate(Base):
"""
Handle HTTP / WebDAV / FTP PUT requests.
"""
from webdav.Lockable import ResourceLockedError
self.dav__init(REQUEST, RESPONSE)
self.dav__simpleifhandler(REQUEST, RESPONSE, refresh=1)
if REQUEST.environ['REQUEST_METHOD'] != 'PUT':
......
......@@ -40,6 +40,7 @@ class MailTemplate(BaseMailTemplate,ZopePageTemplate):
def pt_editAction(self, REQUEST, mailhost, text, content_type, expand):
"""Change the mailhost and document."""
if self.wl_isLocked():
from webdav.Lockable import ResourceLockedError
raise ResourceLockedError, "File is locked via WebDAV"
self.expand=expand
self._setPropValue('mailhost',mailhost)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment