Skip to content

Commit c8ef672

Browse files
up9cloudlittlecodersh
authored andcommitted
fix dump_login_status to wrong file. (#349)
Changing auto_login's statusStorageDir, then KeyboardInterrupt will dump status to default file path, not new path.
1 parent f8c8c80 commit c8ef672

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

itchat/components/register.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ def auto_login(self, hotReload=False, statusStorageDir='itchat.pkl',
2323
logger.info("You can't get access to internet or wechat domain, so exit.")
2424
sys.exit()
2525
self.useHotReload = hotReload
26+
self.hotReloadDir = statusStorageDir
2627
if hotReload:
2728
if self.load_login_status(statusStorageDir,
2829
loginCallback=loginCallback, exitCallback=exitCallback):
2930
return
3031
self.login(enableCmdQR=enableCmdQR, picDir=picDir, qrCallback=qrCallback,
3132
loginCallback=loginCallback, exitCallback=exitCallback)
3233
self.dump_login_status(statusStorageDir)
33-
self.hotReloadDir = statusStorageDir
3434
else:
3535
self.login(enableCmdQR=enableCmdQR, picDir=picDir, qrCallback=qrCallback,
3636
loginCallback=loginCallback, exitCallback=exitCallback)

0 commit comments

Comments
 (0)