Skip to content

Commit

Permalink
chore: revert back module arg 'name' changes
Browse files Browse the repository at this point in the history
The refactoring was not needed and this makes more sense from an
organizational perspective.
  • Loading branch information
carlosmmatos committed Oct 23, 2024
1 parent a8a488f commit a162973
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/modules/sensor_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ def main():

sensor_hash = module.params["hash"]
dest = module.params["dest"]
name = module.params["name"]
tmp_dir = False

if not dest:
Expand All @@ -248,7 +249,8 @@ def main():

if sensor_check["status_code"] == 200:
# Get the name of the sensor installer
name = module.params["name"] or sensor_check["body"]["resources"][0]["name"]
if not name:
name = sensor_check["body"]["resources"][0]["name"]

path = os.path.join(dest, name)
lock = None
Expand Down

0 comments on commit a162973

Please sign in to comment.