merge-requests/30/head
Bob Mottram 2020-08-20 13:11:07 +01:00
parent 28830ed660
commit a771ce3041
2 changed files with 5 additions and 6 deletions

View File

@ -202,14 +202,14 @@ def unfollowPerson(baseDir: str, nickname: str, domain: str,
if debug: if debug:
print('DEBUG: follow file ' + filename + ' was not found') print('DEBUG: follow file ' + filename + ' was not found')
return False return False
if handleToUnfollow.lower() not in open(filename).read().lower(): handleToUnfollowLower = handleToUnfollow.lower()
if handleToUnfollowLower not in open(filename).read().lower():
if debug: if debug:
print('DEBUG: handle to unfollow ' + handleToUnfollow + print('DEBUG: handle to unfollow ' + handleToUnfollow +
' is not in ' + filename) ' is not in ' + filename)
return return
with open(filename, "r") as f: with open(filename, "r") as f:
lines = f.readlines() lines = f.readlines()
handleToUnfollowLower = handleToUnfollow.lower()
with open(filename, "w") as f: with open(filename, "w") as f:
for line in lines: for line in lines:
if line.strip("\n").strip("\r").lower() != handleToUnfollowLower: if line.strip("\n").strip("\r").lower() != handleToUnfollowLower:

View File

@ -706,9 +706,8 @@ def receiveUndoFollow(session, baseDir: str, httpPrefix: str,
nicknameFollowing, domainFollowingFull, nicknameFollowing, domainFollowingFull,
nicknameFollower, domainFollowerFull, nicknameFollower, domainFollowerFull,
debug): debug):
if debug: print(nicknameFollowing + '@' + domainFollowingFull + ': '
print('DEBUG: Follower ' + 'Follower ' + nicknameFollower + '@' + domainFollowerFull +
nicknameFollower + '@' + domainFollowerFull +
' was removed') ' was removed')
return True return True