Make State.fb_dtsg private
This commit is contained in:
@@ -104,7 +104,7 @@ class State(object):
|
|||||||
"""Stores and manages state required for most Facebook requests."""
|
"""Stores and manages state required for most Facebook requests."""
|
||||||
|
|
||||||
user_id = attr.ib()
|
user_id = attr.ib()
|
||||||
fb_dtsg = attr.ib()
|
_fb_dtsg = attr.ib()
|
||||||
_revision = attr.ib()
|
_revision = attr.ib()
|
||||||
_session = attr.ib(factory=session_factory)
|
_session = attr.ib(factory=session_factory)
|
||||||
_counter = attr.ib(0)
|
_counter = attr.ib(0)
|
||||||
@@ -117,7 +117,7 @@ class State(object):
|
|||||||
"__a": 1,
|
"__a": 1,
|
||||||
"__req": _util.str_base(self._counter, 36),
|
"__req": _util.str_base(self._counter, 36),
|
||||||
"__rev": self._revision,
|
"__rev": self._revision,
|
||||||
"fb_dtsg": self.fb_dtsg,
|
"fb_dtsg": self._fb_dtsg,
|
||||||
}
|
}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -213,7 +213,7 @@ class State(object):
|
|||||||
_util.log.warning("Refreshing state and resending request")
|
_util.log.warning("Refreshing state and resending request")
|
||||||
new = State.from_session(session=self._session)
|
new = State.from_session(session=self._session)
|
||||||
self.user_id = new.user_id
|
self.user_id = new.user_id
|
||||||
self.fb_dtsg = new.fb_dtsg
|
self._fb_dtsg = new._fb_dtsg
|
||||||
self._revision = new._revision
|
self._revision = new._revision
|
||||||
self._counter = new._counter
|
self._counter = new._counter
|
||||||
self._logout_h = new._logout_h or self._logout_h
|
self._logout_h = new._logout_h or self._logout_h
|
||||||
@@ -304,7 +304,7 @@ class State(object):
|
|||||||
# update JS token if received in response
|
# update JS token if received in response
|
||||||
fb_dtsg = _util.get_jsmods_require(j, 2)
|
fb_dtsg = _util.get_jsmods_require(j, 2)
|
||||||
if fb_dtsg is not None:
|
if fb_dtsg is not None:
|
||||||
self.fb_dtsg = fb_dtsg
|
self._fb_dtsg = fb_dtsg
|
||||||
|
|
||||||
try:
|
try:
|
||||||
message_ids = [
|
message_ids = [
|
||||||
|
Reference in New Issue
Block a user