From bcb2f594583270909b1ef1f8e77cb39b154baa48 Mon Sep 17 00:00:00 2001 From: bhavikbhavsar Date: Fri, 8 Mar 2019 19:05:13 +0530 Subject: [PATCH] Minor Undefined variable fixes (#53383) Signed-off-by: Bhavik Bhavsar --- lib/ansible/modules/cloud/misc/rhevm.py | 1 - lib/ansible/modules/files/archive.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/misc/rhevm.py b/lib/ansible/modules/cloud/misc/rhevm.py index b1fef9c1897..58a908dfb3c 100644 --- a/lib/ansible/modules/cloud/misc/rhevm.py +++ b/lib/ansible/modules/cloud/misc/rhevm.py @@ -615,7 +615,6 @@ class RHEVConn(object): return False elif int(DISK.size) > (1024 * 1024 * 1024 * int(disksize)): setMsg("Shrinking disks is not supported") - setMsg(str(e)) setFailed() return False else: diff --git a/lib/ansible/modules/files/archive.py b/lib/ansible/modules/files/archive.py index defa8fde3fe..bf8d10e5fab 100644 --- a/lib/ansible/modules/files/archive.py +++ b/lib/ansible/modules/files/archive.py @@ -407,7 +407,7 @@ def main(): errors.append(path) if errors: - module.fail_json(dest=dest, msg='Error deleting some source files: ' + str(e), files=errors) + module.fail_json(dest=dest, msg='Error deleting some source files: ', files=errors) # Rudimentary check: If size changed then file changed. Not perfect, but easy. if not check_mode and os.path.getsize(dest) != size: