Fixed nickServ auto-identify KeyError
This commit is contained in:
parent
33ae77f99a
commit
70b1c102b8
1 changed files with 12 additions and 2 deletions
14
profile.py
14
profile.py
|
@ -428,8 +428,18 @@ class userProfile(object):
|
|||
self.autoidentify = False
|
||||
self.nickservpass = ""
|
||||
if self.chat.handle in self.passwd:
|
||||
self.autoidentify = self.passwd[self.chat.handle]["auto"]
|
||||
self.nickservpass = self.passwd[self.chat.handle]["pw"]
|
||||
# Fix for:
|
||||
# Traceback (most recent call last):
|
||||
# File "pesterchum.py", line 2944, in nickCollision
|
||||
# File "pesterchum.py", line 1692, in changeProfile
|
||||
# File "XXX\menus.py", line 795, in init
|
||||
# File "XXX\profile.py", line 350, in availableProfiles
|
||||
# File "XXX\profile.py", line 432, in init
|
||||
# KeyError: 'pw'
|
||||
if "auto" in self.passwd[self.chat.handle]:
|
||||
self.autoidentify = self.passwd[self.chat.handle]["auto"]
|
||||
if "pw" in self.passwd[self.chat.handle]:
|
||||
self.nickservpass = self.passwd[self.chat.handle]["pw"]
|
||||
|
||||
def setMood(self, mood):
|
||||
self.chat.mood = mood
|
||||
|
|
Loading…
Reference in a new issue