Skip to content

Commit

Permalink
Prevent error if module.params['path'] has no path included.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Dec 18, 2018
1 parent 13f2b29 commit b1e571a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/modules/crypto/openssh_keypair.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def main():
)

# Check if Path exists
base_dir = os.path.dirname(module.params['path'])
base_dir = os.path.dirname(module.params['path']) or '.'
if not os.path.isdir(base_dir):
module.fail_json(
name=base_dir,
Expand Down

0 comments on commit b1e571a

Please sign in to comment.