Skip to content

erroneous kwargs silently accepted by Client class #264

@MuellerSeb

Description

@MuellerSeb

The following fails

oc = owncloud.Client.from_public_link("<nc-url>/s/<public-token>", password="<pw>")
oc.mkdir("test")

with

HTTPResponseError                         Traceback (most recent call last)
<ipython-input-4-4007f7387f97> in <module>
----> 1 cl.mkdir("test")

/usr/local/lib/python3.6/dist-packages/owncloud/owncloud.py in mkdir(self, path)
    700         if not path.endswith('/'):
    701             path += '/'
--> 702         return self._make_dav_request('MKCOL', path)
    703 
    704     def delete(self, path):

/usr/local/lib/python3.6/dist-packages/owncloud/owncloud.py in _make_dav_request(self, method, path, **kwargs)
   1813         if res.status_code in [204, 201]:
   1814             return True
-> 1815         raise HTTPResponseError(res)
   1816 
   1817     def _parse_dav_response(self, res):

HTTPResponseError: HTTP error: 401

The following is working:

oc = owncloud.Client("<nc-url>")
oc.anon_login("<public-token>", "<pw>")
oc.mkdir("test")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions