Skip to content

Commit

Permalink
MAINT: Remove dav connector and zope dav connector
Browse files Browse the repository at this point in the history
  • Loading branch information
louika committed Sep 4, 2024
1 parent 0692e3c commit 09047a5
Show file tree
Hide file tree
Showing 38 changed files with 36 additions and 3,957 deletions.
1 change: 1 addition & 0 deletions core/docs/changelog/davconnector.maint
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MAINT: Remove obsolete dav connector and zope dav connector
2 changes: 1 addition & 1 deletion core/src/zeit/cms/checkout/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ Checking in is not possible just like that:
>>> ICheckinManager(checked_out).checkin()
Traceback (most recent call last):
...
ConflictError: There was a conflict while adding ${name}
ConflictError

Checking in is possible with ignored conflicts:

Expand Down
10 changes: 1 addition & 9 deletions core/src/zeit/cms/repository/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@
import zope.processlifetime
import zope.securitypolicy.interfaces

from zeit.cms.i18n import MessageFactory as _
from zeit.cms.repository.interfaces import IRepositoryContent
import zeit.cms.config
import zeit.cms.interfaces
import zeit.cms.repository.interfaces
import zeit.cms.section.interfaces
import zeit.connector.dav.interfaces
import zeit.connector.interfaces


Expand Down Expand Up @@ -301,13 +299,7 @@ def addContent(self, content, ignore_conflicts=False):
resource = zeit.cms.interfaces.IResource(content)
if resource.id is None:
raise ValueError('Objects to be added to the repository need a ' 'unique id.')
try:
self.connector.add(resource, verify_etag=not ignore_conflicts)
except zeit.connector.dav.interfaces.PreconditionFailedError:
raise zeit.cms.repository.interfaces.ConflictError(
content.uniqueId,
_('There was a conflict while adding ${name}', mapping={'name': content.uniqueId}),
)
self.connector.add(resource, verify_etag=not ignore_conflicts)

@property
def repository(self):
Expand Down
Loading

0 comments on commit 09047a5

Please sign in to comment.