Skip to content
Snippets Groups Projects
Commit e5d5acb5 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt
Browse files

Fix d/p/01-recursive-properties.patch


d/p/01-recursive-properties.patch assigns a dict_keys object to namespaces
but namespaces needs to be a list.

This leads to an autopkgtest failure:

    File "/usr/lib/python3/dist-packages/pywebdav/lib/propfind.py",
    line 268, in mk_prop_response
      ns_prefix = "ns" + str(self.namespaces.index(ns)) + ":"
                           ^^^^^^^^^^^^^^^^^^^^^
    AttributeError: 'dict_keys' object has no attribute 'index'

Signed-off-by: default avatarHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
parent 2f9c9ddd
No related branches found
No related tags found
1 merge request!2Fix d/p/01-recursive-properties.patch
......@@ -61,7 +61,7 @@ Forwarded: http://code.google.com/p/pywebdav/issues/detail?id=70
if self._depth == "0":
+ if allprop:
+ self.proplist = self._dataclass.get_propnames(self._uri)
+ self.namespaces = self.proplist.keys()
+ self.namespaces = list(self.proplist)
gp, bp = self.get_propvalues(self._uri)
res = self.mk_prop_response(self._uri, gp, bp, doc)
ms.appendChild(res)
......@@ -69,7 +69,7 @@ Forwarded: http://code.google.com/p/pywebdav/issues/detail?id=70
elif self._depth == "1":
+ if allprop:
+ self.proplist = self._dataclass.get_propnames(self._uri)
+ self.namespaces = self.proplist.keys()
+ self.namespaces = list(self.proplist)
gp, bp = self.get_propvalues(self._uri)
res = self.mk_prop_response(self._uri, gp, bp, doc)
ms.appendChild(res)
......@@ -77,7 +77,7 @@ Forwarded: http://code.google.com/p/pywebdav/issues/detail?id=70
for newuri in self._dataclass.get_childs(self._uri):
+ if allprop:
+ self.proplist = self._dataclass.get_propnames(newuri)
+ self.namespaces = self.proplist.keys()
+ self.namespaces = list(self.proplist)
gp, bp = self.get_propvalues(newuri)
res = self.mk_prop_response(newuri, gp, bp, doc)
ms.appendChild(res)
......@@ -87,7 +87,7 @@ Forwarded: http://code.google.com/p/pywebdav/issues/detail?id=70
uri = uri_list.pop()
+ if allprop:
+ self.proplist = self._dataclass.get_propnames(uri)
+ self.namespaces = self.proplist.keys()
+ self.namespaces = list(self.proplist)
gp, bp = self.get_propvalues(uri)
res = self.mk_prop_response(uri, gp, bp, doc)
ms.appendChild(res)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment