Can't use objects in default args

This commit is contained in:
wiredfool 2017-03-07 01:32:01 -08:00
parent 51b46e00c2
commit 676d0c3b3b

View File

@ -714,7 +714,7 @@ def _write_frame_data(fp, im_frame, offset, params):
# --------------------------------------------------------------------
# Legacy GIF utilities
def getheader(im, palette=None, info=[]):
def getheader(im, palette=None, info=None):
"""
Legacy Method to get Gif data from image.
@ -728,6 +728,9 @@ def getheader(im, palette=None, info=[]):
"""
used_palette_colors = _get_optimize(im, info)
if info is None:
info = {}
if not "background" in info and "background" in im.info:
info["background"] = im.info["background"]