We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c167d82 + 188cbe0 commit 77ee8bcCopy full SHA for 77ee8bc
1 file changed
vk/api.py
@@ -4,8 +4,8 @@
4
import logging.config
5
6
from vk.logs import LOGGING_CONFIG
7
-from vk.utils import stringify_values, json_iter_parse, LoggingSession
8
-from vk.exceptions import VkAuthError, VkAPIError, CAPTCHA_IS_NEEDED, AUTHORIZATION_FAILED
+from vk.utils import stringify_values, json_iter_parse, LoggingSession, str_type
+from vk.exceptions import VkAuthError, VkAPIError
9
from vk.mixins import AuthMixin, InteractiveMixin
10
11
@@ -43,7 +43,7 @@ def access_token(self):
43
@access_token.setter
44
def access_token(self, value):
45
self._access_token = value
46
- if len(value) >= 12:
+ if isinstance(value, str_type) and len(value) >= 12:
47
self.censored_access_token = '{}***{}'.format(value[:4], value[-4:])
48
else:
49
self.censored_access_token = value
0 commit comments