Commit 8d656cc9 authored by Mathieu Giraud's avatar Mathieu Giraud

*/*.py: fix dangerous [] default values

Thanks to landscape.io.
parent 4d997261
......@@ -4,7 +4,9 @@ import glob
from collections import defaultdict
def sort_except_fixed_order(l, fixed_order=[]):
def sort_except_fixed_order(l, fixed_order=None):
if fixed_order is None:
fixed_order = []
ll = filter(lambda x: x not in fixed_order, l)
return fixed_order + sorted(ll)
......
......@@ -43,7 +43,11 @@ def format_rank_nb_reads(rank, list_nb_reads, list_total_nb_reads):
return s
def common_two_clones(self, other, seg=[1000000]):
def common_two_clones(self, other, seg=None):
if seg is None:
seg = [1000000]
if not other or not self:
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment