-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
erroneous kwargs silently accepted by Client class #264
Comments
I am just dumb. Needed to use oc = owncloud.Client.from_public_link("<nc-url>/s/<public-token>", folder_password="<pw>")
oc.mkdir("test") is working fine. Maybe this could just be a hint, that it silently accepted pyocclient/owncloud/owncloud.py Line 341 in 72a6666
Instead of: self._debug = kwargs.get('debug', False)
self._verify_certs = kwargs.get('verify_certs', True)
self._dav_endpoint_version = kwargs.get('dav_endpoint_version', True) One could use the following: self._debug = kwargs.pop('debug', False)
self._verify_certs = kwargs.pop('verify_certs', True)
self._dav_endpoint_version = kwargs.pop('dav_endpoint_version', True)
if kwargs:
print("unknown kwargs: {}".format(kwargs)) Or even raise a |
Or I am not so dumb after all. The example in https://github.com/owncloud/pyocclient/blob/master/docs/source/README.rst shows the wrong usage of
This should use So we have both: A wrong documentation and a silent acceptance of wrong kwargs which will confuse users (like me). |
Documentation issue solved with #268 |
The following fails
with
The following is working:
The text was updated successfully, but these errors were encountered: