From fc364b68d990edaa2da445ec621b761f751b0944 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 1 Dec 2019 14:03:18 +0000 Subject: [PATCH] Debug --- posts.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/posts.py b/posts.py index 92c349baa..259271559 100644 --- a/posts.py +++ b/posts.py @@ -2649,9 +2649,11 @@ def mutePost(baseDir: str,nickname: str,domain: str,postId: str, \ if not postJsonObject: return + print('MUTE: '+postFilename) muteFile=open(postFilename+'.muted', "w") - muteFile.write('\n') - muteFile.close() + if muteFile: + muteFile.write('\n') + muteFile.close() # remove cached posts so that the muted version gets created cachedPostFilename= \ @@ -2672,6 +2674,7 @@ def unmutePost(baseDir: str,nickname: str,domain: str,postId: str, \ if not postJsonObject: return + print('UNMUTE: '+postFilename) muteFilename=postFilename+'.muted' if os.path.isfile(muteFilename): os.remove(muteFilename)