canonical / canonical/cloud-init
util.mount_cb only supports passing through a single (positional) argument to the wrapped function
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 1.1k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 18
Description
This bug was originally filed in Launchpad as [LP: #1884979](https://bugs.launchpad.net/cloud-init/+bug/1884979)
Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2020-06-24T14:45:54.248299+00:00
date_fix_committed = None
date_fix_released = None
id = 1884979
importance = undecided
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1884979
milestone = None
owner = oddbloke
owner_name = Dan Watkins
private = False
status = triaged
submitter = oddbloke
submitter_name = Dan Watkins
tags = []
duplicates = []
_Launchpad user **Dan Watkins(oddbloke)** wrote on 2020-06-24T14:45:54.248299+00:00_
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.)
Contributor guide
Assessment
This issue has not been assessed yet.