util.mount_cb only supports passing through a single (positional) argument to the wrapped function

Bug #1884979 reported by Dan Watkins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Undecided
Unassigned

Bug Description

This makes it difficult to use with a function that needs to take more than a single positional parameter, or any keyword arguments; you have to partially apply the function before calling mount_cb.

I propose adding `args` and `kwargs` parameters, which will be passed to the callback function using *args and **kwargs. (For bonus points, refactor all current callsites to pass `args` so we can drop the `data` argument entirely.)

Revision history for this message
Dan Watkins (oddbloke) wrote :

I haven't started work on this specific feature, but I have started looking at writing tests for mount_cb's current behaviour as it is presently untested.

Revision history for this message
Dan Watkins (oddbloke) wrote :
Dan Watkins (oddbloke)
Changed in cloud-init:
status: New → Triaged
Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Triaged → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.