File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 55
66setuptools .setup (
77 name = "tryhackme.py" ,
8- version = "1.0.0 " ,
8+ version = "1.2.1 " ,
99 author = "gnarlito" ,
1010 author_email = "gnarlito35@gmail.com" ,
1111 description = "THM public API wrapper" ,
Original file line number Diff line number Diff line change @@ -19,5 +19,5 @@ def _from_data(self, data):
1919 self .correct = data .get ("correct" , False )
2020 self .attempts = data .get ("attempts" , 0 )
2121 self .submission = data .get ("submission" , "" )
22- self .has_answer = data .get ("noAnswer" , False )
22+ self .has_answer = not data .get ("noAnswer" , False )
2323
Original file line number Diff line number Diff line change @@ -37,6 +37,16 @@ def _clear_client(self):
3737 self ._message_groups = weakref .WeakValueDictionary ()
3838 self ._team = None
3939
40+ def _clear_all (self ):
41+ self ._rooms = weakref .WeakValueDictionary ()
42+ self ._paths = weakref .WeakValueDictionary ()
43+ self ._modules = weakref .WeakValueDictionary ()
44+ self ._users = weakref .WeakValueDictionary ()
45+ self ._message_groups = weakref .WeakValueDictionary ()
46+ self ._badges = weakref .WeakValueDictionary ()
47+ self ._series = weakref .WeakValueDictionary ()
48+ self ._networks = weakref .WeakValueDictionary ()
49+
4050 def get_client_user (self ):
4151 return self .user
4252
You can’t perform that action at this time.
0 commit comments