Skip to content

Commit

Permalink
Merge pull request #845 from ZeitOnline/maint_rm_dav_connector
Browse files Browse the repository at this point in the history
MAINT: Remove dav connector and zope dav connector
  • Loading branch information
wosc authored Sep 4, 2024
2 parents 0692e3c + 09047a5 commit a940a8a
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 a940a8a

Please sign in to comment.