Removed mutable arguments
This patch remves the set() mutable argument as default value, sets the default value to None and check if the argument is none in the code to call set().
This commit is contained in:
@ -190,13 +190,16 @@ class LocalStatusFolder(BaseFolder):
|
||||
os.close(fd)
|
||||
|
||||
# Interface from BaseFolder
|
||||
def savemessage(self, uid, content, flags, rtime, mtime=0, labels=set()):
|
||||
def savemessage(self, uid, content, flags, rtime, mtime=0, labels=None):
|
||||
"""Writes a new message, with the specified uid.
|
||||
|
||||
See folder/Base for detail. Note that savemessage() does not
|
||||
check against dryrun settings, so you need to ensure that
|
||||
savemessage is never called in a dryrun mode."""
|
||||
|
||||
if labels is None:
|
||||
labels = set()
|
||||
|
||||
if uid < 0:
|
||||
# We cannot assign a uid.
|
||||
return uid
|
||||
|
Reference in New Issue
Block a user