Remove deactivated accounts

main2
Bob Mottram 2019-11-05 10:28:46 +00:00
parent 4d88fa3ead
commit 157ec0de71
1 changed files with 2 additions and 0 deletions

View File

@ -683,6 +683,8 @@ def removeAccount(baseDir: str,nickname: str,domain: str,port: int) -> bool:
handle=nickname+'@'+domain handle=nickname+'@'+domain
removePassword(baseDir,nickname) removePassword(baseDir,nickname)
removeTagsForNickname(baseDir,nickname,domain,port) removeTagsForNickname(baseDir,nickname,domain,port)
if os.path.isdir(baseDir+'/deactivated/'+handle):
shutil.rmtree(baseDir+'/deactivated/'+handle)
if os.path.isdir(baseDir+'/accounts/'+handle): if os.path.isdir(baseDir+'/accounts/'+handle):
shutil.rmtree(baseDir+'/accounts/'+handle) shutil.rmtree(baseDir+'/accounts/'+handle)
if os.path.isfile(baseDir+'/accounts/'+handle+'.json'): if os.path.isfile(baseDir+'/accounts/'+handle+'.json'):