Skip to content

Commit

Permalink
Trying out without hasattr
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiol committed Aug 30, 2024
1 parent e279642 commit 367baa5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/modules/create_blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ def create_blueprint(module, weldr):

try:
with open(module.params["dest"], "w") as fd:
if hasattr(weldr, 'toml'):
weldr.toml.dump(toml_data, fd)
# if hasattr(weldr, 'toml'):
weldr.toml.dump(toml_data, fd)
except Exception as e:
module.fail_json(msg=f'Failed to write to file: {module.params["dest"]}', error=e)

Expand Down

0 comments on commit 367baa5

Please sign in to comment.