Mercurial > evolve
changeset 4325:7f3c25791fe2
exthelper: avoid a [] default arg to wrapcommand()
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 27 Dec 2018 21:26:17 -0500 |
parents | e913546b9d79 |
children | 80fce30fd919 |
files | hgext3rd/evolve/exthelper.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/exthelper.py Fri Jan 04 00:10:44 2019 -0500 +++ b/hgext3rd/evolve/exthelper.py Thu Dec 27 21:26:17 2018 -0500 @@ -281,7 +281,7 @@ return keyword return dec - def wrapcommand(self, command, extension=None, opts=[]): + def wrapcommand(self, command, extension=None, opts=None): """Decorated function is a command wrapper The name of the command must be given as the decorator argument. @@ -304,6 +304,8 @@ command. """ + if opts is None: + opts = [] def dec(wrapper): if extension is None: self._commandwrappers.append((command, wrapper, opts))