mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
introduced with 9e277aabb033b3ec823b4a2db7c0f7e315eaaf0b
This commit is contained in:
parent
04b4ca51c3
commit
4bfffe813b
4 changed files with 5 additions and 5 deletions
|
@ -150,7 +150,7 @@ class CronVar(object):
|
||||||
self.lines = f.read().splitlines()
|
self.lines = f.read().splitlines()
|
||||||
f.close()
|
f.close()
|
||||||
except IOError:
|
except IOError:
|
||||||
e = get_exception
|
e = get_exception()
|
||||||
# cron file does not exist
|
# cron file does not exist
|
||||||
return
|
return
|
||||||
except:
|
except:
|
||||||
|
@ -207,7 +207,7 @@ class CronVar(object):
|
||||||
os.unlink(self.cron_file)
|
os.unlink(self.cron_file)
|
||||||
return True
|
return True
|
||||||
except OSError:
|
except OSError:
|
||||||
e = get_exception
|
e = get_exception()
|
||||||
# cron file does not exist
|
# cron file does not exist
|
||||||
return False
|
return False
|
||||||
except:
|
except:
|
||||||
|
|
|
@ -130,7 +130,7 @@ def main():
|
||||||
crypttab = Crypttab(path)
|
crypttab = Crypttab(path)
|
||||||
existing_line = crypttab.match(name)
|
existing_line = crypttab.match(name)
|
||||||
except Exception:
|
except Exception:
|
||||||
e = get_exception
|
e = get_exception()
|
||||||
module.fail_json(msg="failed to open and parse crypttab file: %s" % e,
|
module.fail_json(msg="failed to open and parse crypttab file: %s" % e,
|
||||||
**module.params)
|
**module.params)
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ def main():
|
||||||
try:
|
try:
|
||||||
rc, out, err = module.run_command(cmd)
|
rc, out, err = module.run_command(cmd)
|
||||||
except Exception:
|
except Exception:
|
||||||
e = get_exception
|
e = get_exception()
|
||||||
module.fail_json(msg=str(e))
|
module.fail_json(msg=str(e))
|
||||||
|
|
||||||
msg = "Unexpected failure!"
|
msg = "Unexpected failure!"
|
||||||
|
|
|
@ -150,7 +150,7 @@ def run_gluster(gargs, **kwargs):
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
module.fail_json(msg='error running gluster (%s) command (rc=%d): %s' % (' '.join(args), rc, out or err))
|
module.fail_json(msg='error running gluster (%s) command (rc=%d): %s' % (' '.join(args), rc, out or err))
|
||||||
except Exception:
|
except Exception:
|
||||||
e = get_exception
|
e = get_exception()
|
||||||
module.fail_json(msg='error running gluster (%s) command: %s' % (' '.join(args), str(e)))
|
module.fail_json(msg='error running gluster (%s) command: %s' % (' '.join(args), str(e)))
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue