yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #83101
[Bug 1884979] [NEW] util.mount_cb only supports passing through a single (positional) argument to the wrapped function
Public bug reported:
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.)
** Affects: cloud-init
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1884979
Title:
util.mount_cb only supports passing through a single (positional)
argument to the wrapped function
Status in cloud-init:
New
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.)
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1884979/+subscriptions
Follow ups