Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
firefoxtree: use kwargs instead of args for pre 4.6 function signatur…
…e (Bug 1505162) Template keywords in Mercurial 4.6+ have a new signature and API. When upgrading the signature backwards compatibility was required with versions 4.4 and 4.5, so the arguments were collected in `*args` and expanded after determining which API version is required. It appears that the arguments were actually keyword arguments, so `*args` is actually empty and we need to get the arguments from `kwargs`. The behaviour in question can be demonstrated with the following example: Python 2.7.13 (default, Nov 6 2018, 15:52:08) [GCC 7.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> def a(test): ... print test ... >>> r = {'test': 'hello'} >>> a(**r) hello Despite `test` being a positional argument in `a`, we can pass a dict with a "test" key and the function call will execute correctly. This commit changes the function to resolve it's arguments from `kwargs` instead of `args` on Mercurial less than 4.6.
- Loading branch information