Skip to content

Commit 2f973f1

Browse files
committed
Privatize default_thread_X client variables
We have a setter method for them, so there should be no need to access these directly!
1 parent 9b81365 commit 2f973f1

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

fbchat/_client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ def __init__(
7373
self.seq = "0"
7474
# See `createPoll` for the reason for using `OrderedDict` here
7575
self.payloadDefault = OrderedDict()
76-
self.default_thread_id = None
77-
self.default_thread_type = None
76+
self._default_thread_id = None
77+
self._default_thread_type = None
7878
self.req_url = ReqUrl()
7979
self._markAlive = True
8080
self._buddylist = dict()
@@ -539,8 +539,8 @@ def _getThread(self, given_thread_id=None, given_thread_type=None):
539539
:rtype: tuple
540540
"""
541541
if given_thread_id is None:
542-
if self.default_thread_id is not None:
543-
return self.default_thread_id, self.default_thread_type
542+
if self._default_thread_id is not None:
543+
return self._default_thread_id, self._default_thread_type
544544
else:
545545
raise ValueError("Thread ID is not set")
546546
else:
@@ -554,8 +554,8 @@ def setDefaultThread(self, thread_id, thread_type):
554554
:param thread_type: See :ref:`intro_threads`
555555
:type thread_type: models.ThreadType
556556
"""
557-
self.default_thread_id = thread_id
558-
self.default_thread_type = thread_type
557+
self._default_thread_id = thread_id
558+
self._default_thread_type = thread_type
559559

560560
def resetDefaultThread(self):
561561
"""Resets default thread"""

0 commit comments

Comments
 (0)