Philipp Hörist pushed to branch master at gajim / gajim
Commits:
47f1f419 by Philipp Hörist at 2017-12-03T15:34:33+01:00
Dont use mutable objects as default arguments
- - - - -
2 changed files:
- gajim/chat_control_base.py
- gajim/conversation_textview.py
Changes:
=====================================
gajim/chat_control_base.py
=====================================
--- 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,
=====================================
gajim/conversation_textview.py
=====================================
--- 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()
View it on GitLab:
https://dev.gajim.org/gajim/gajim/commit/47f1f41977b787bd6be058dc53b573b311fd660f
---
View it on GitLab:
https://dev.gajim.org/gajim/gajim/commit/47f1f41977b787bd6be058dc53b573b311fd660f
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits