util.mount_cb only supports passing through a single (positional) argument to the wrapped function
Bug #1884979 reported by
Dan Watkins
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.)
Changed in cloud-init: | |
status: | New → Triaged |
To post a comment you must log in.
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.