[PR #6114/6cf67448 backport][stable-6] memset*.py: Fixed URLError handling (#6157)

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

(cherry picked from commit 6cf674485f)

Co-authored-by: Daniel Patrick <dani.p1991@gmail.com>
This commit is contained in:
patchback[bot] 2023-03-08 13:58:39 +01:00 committed by GitHub
parent 47514e1401
commit 36eff2fd99
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())