Skip to content

Commit

Permalink
fix(step_ca_boostrap): don't fail on ubuntu 18.04 (#64)
Browse files Browse the repository at this point in the history
It seems that only catching OSError isn't sufficient on some systems
and python versions, as this module currently crashes under Ubuntu 18.04
with a FileNotFoundError that is not caught properly. This patch addresses that.
  • Loading branch information
maxhoesel authored May 24, 2021
1 parent b0f51ad commit 67331de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/modules/step_ca_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def run_module():
try:
with open(DEFAULTS_FILE, "rb") as f:
config = json.load(f)
except OSError:
except (OSError, IOError):
# The file probably doesn't exist yet, continue for now
config = {}
if config.get("fingerprint", "") == module.params["fingerprint"]:
Expand Down

0 comments on commit 67331de

Please sign in to comment.