memset*.py: Fixed URLError handling (#6114)

* memset.py: Added URLError exception and stderr to Response() object

* memset_*.py: Check response.status_code and response.stderr

* Added changelog fragment

* memset.py: Fixed pep8

* Renamed changelog fragment with .yml file extension
This commit is contained in:
Daniel Patrick 2023-03-08 07:54:36 +01:00 committed by GitHub
parent 11c7611ced
commit 6cf674485f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 30 additions and 5 deletions

View file

@ -264,6 +264,9 @@ def create_or_delete(args=None):
retvals['failed'] = _has_failed
retvals['msg'] = _msg
if response.stderr is not None:
retvals['stderr'] = response.stderr
return retvals
zone_exists, _msg, counter, _zone_id = get_zone_id(zone_name=args['name'], current_zones=response.json())