From bf07cf8d3bd2fc6af23eb724bb34bc189d7bd6d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Moser?= Date: Thu, 30 Jun 2016 16:37:21 +0200 Subject: [PATCH] fix typo in get_exception(), extends fix #2502 (#2507) introduced with 9e277aabb033b3ec823b4a2db7c0f7e315eaaf0b --- system/cronvar.py | 4 ++-- system/crypttab.py | 2 +- system/getent.py | 2 +- system/gluster_volume.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/system/cronvar.py b/system/cronvar.py index df172be8bdc..21f92be964e 100644 --- a/system/cronvar.py +++ b/system/cronvar.py @@ -150,7 +150,7 @@ class CronVar(object): self.lines = f.read().splitlines() f.close() except IOError: - e = get_exception + e = get_exception() # cron file does not exist return except: @@ -207,7 +207,7 @@ class CronVar(object): os.unlink(self.cron_file) return True except OSError: - e = get_exception + e = get_exception() # cron file does not exist return False except: diff --git a/system/crypttab.py b/system/crypttab.py index e8e0b5835f4..ea9698a12c2 100644 --- a/system/crypttab.py +++ b/system/crypttab.py @@ -130,7 +130,7 @@ def main(): crypttab = Crypttab(path) existing_line = crypttab.match(name) except Exception: - e = get_exception + e = get_exception() module.fail_json(msg="failed to open and parse crypttab file: %s" % e, **module.params) diff --git a/system/getent.py b/system/getent.py index 85893f13e8a..37bfc244dea 100644 --- a/system/getent.py +++ b/system/getent.py @@ -114,7 +114,7 @@ def main(): try: rc, out, err = module.run_command(cmd) except Exception: - e = get_exception + e = get_exception() module.fail_json(msg=str(e)) msg = "Unexpected failure!" diff --git a/system/gluster_volume.py b/system/gluster_volume.py index 1f968271154..f7fae041299 100644 --- a/system/gluster_volume.py +++ b/system/gluster_volume.py @@ -150,7 +150,7 @@ def run_gluster(gargs, **kwargs): if rc != 0: module.fail_json(msg='error running gluster (%s) command (rc=%d): %s' % (' '.join(args), rc, out or err)) except Exception: - e = get_exception + e = get_exception() module.fail_json(msg='error running gluster (%s) command: %s' % (' '.join(args), str(e))) return out