From 47f1f41977b787bd6be058dc53b573b311fd660f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Sun, 3 Dec 2017 15:34:33 +0100 Subject: [PATCH] Dont use mutable objects as default arguments --- gajim/chat_control_base.py | 2 +- gajim/conversation_textview.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gajim/chat_control_base.py b/gajim/chat_control_base.py index 13bbf599d..2de753bba 100644 --- a/gajim/chat_control_base.py +++ b/gajim/chat_control_base.py @@ -913,7 +913,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools): self.received_history_pos = pos def print_conversation_line(self, text, kind, name, tim, - other_tags_for_name=[], other_tags_for_time=[], other_tags_for_text=[], + other_tags_for_name=None, other_tags_for_time=None, other_tags_for_text=None, count_as_new=True, subject=None, old_kind=None, xhtml=None, simple=False, xep0184_id=None, graphics=True, displaymarking=None, msg_log_id=None, msg_stanza_id=None, correct_id=None, additional_data=None, diff --git a/gajim/conversation_textview.py b/gajim/conversation_textview.py index 8ede45000..721306d93 100644 --- a/gajim/conversation_textview.py +++ b/gajim/conversation_textview.py @@ -1353,11 +1353,13 @@ class ConversationTextview(GObject.GObject): buffer_.insert(end_iter, subject) self.print_empty_line(end_iter) - def print_real_text(self, text, text_tags=[], name=None, xhtml=None, + def print_real_text(self, text, text_tags=None, name=None, xhtml=None, graphics=True, mark=None, additional_data=None): """ Add normal and special text. call this to add text """ + if text_tags is None: + text_tags = [] if additional_data is None: additional_data = {} buffer_ = self.tv.get_buffer()