Add debug

This commit is contained in:
Antonio J. Delgado 2024-11-11 10:50:19 +02:00
parent a9b53b884e
commit 7272d3dce8

View file

@ -589,6 +589,12 @@ r.status_code
post_obj['folder'] = self.get_folder_id(post_obj['folder'])
if not self.exists_password(post_obj):
try:
safer_obj = post_obj
safer_obj['password'] = '***'
self._log.debug(
"Creating password: %s",
json.dumps(safer_obj, indent=2)
)
r = requests.post(
f'{self.http}://{self.host}/index.php/apps/passwords/api/1.0/password/create',
data=post_obj,
@ -629,7 +635,6 @@ r.status_code
if r.status_code == 200:
return r.json()
else:
self._log.error(
"Nextcloud instance returned status code: %s",
r.status_code
@ -655,7 +660,6 @@ r.status_code
if r.status_code == 200:
return r.json()
else:
self._log.error(
"Nextcloud instance returned status code: %s",
r.status_code