From: Robert Lehmann Date: Fri, 26 Nov 2010 08:47:46 +0000 (+0100) Subject: Safeguard List._sort_bugs from accumulating values in its default parameters. X-Git-Tag: 1.1.0~245^2~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5d8e5bf31fa4035d8c45300244432de7d772832e;p=be.git Safeguard List._sort_bugs from accumulating values in its default parameters. --- diff --git a/libbe/command/list.py b/libbe/command/list.py index f348d5c..2611692 100644 --- a/libbe/command/list.py +++ b/libbe/command/list.py @@ -179,7 +179,9 @@ class List (libbe.command.Command): for x in params['extra-strings'].split(',')] return (cmp_list, status, severity, assigned, extra_strings_regexps) - def _sort_bugs(self, bugs, cmp_list=[]): + def _sort_bugs(self, bugs, cmp_list=None): + if cmp_list is None: + cmp_list = [] cmp_list.extend(libbe.bug.DEFAULT_CMP_FULL_CMP_LIST) cmp_fn = libbe.bug.BugCompoundComparator(cmp_list=cmp_list) bugs.sort(cmp_fn)