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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to