forked from indymedia/epicyon
Tidying
parent
28830ed660
commit
a771ce3041
|
@ -202,14 +202,14 @@ def unfollowPerson(baseDir: str, nickname: str, domain: str,
|
|||
if debug:
|
||||
print('DEBUG: follow file ' + filename + ' was not found')
|
||||
return False
|
||||
if handleToUnfollow.lower() not in open(filename).read().lower():
|
||||
handleToUnfollowLower = handleToUnfollow.lower()
|
||||
if handleToUnfollowLower not in open(filename).read().lower():
|
||||
if debug:
|
||||
print('DEBUG: handle to unfollow ' + handleToUnfollow +
|
||||
' is not in ' + filename)
|
||||
return
|
||||
with open(filename, "r") as f:
|
||||
lines = f.readlines()
|
||||
handleToUnfollowLower = handleToUnfollow.lower()
|
||||
with open(filename, "w") as f:
|
||||
for line in lines:
|
||||
if line.strip("\n").strip("\r").lower() != handleToUnfollowLower:
|
||||
|
|
5
inbox.py
5
inbox.py
|
@ -706,9 +706,8 @@ def receiveUndoFollow(session, baseDir: str, httpPrefix: str,
|
|||
nicknameFollowing, domainFollowingFull,
|
||||
nicknameFollower, domainFollowerFull,
|
||||
debug):
|
||||
if debug:
|
||||
print('DEBUG: Follower ' +
|
||||
nicknameFollower + '@' + domainFollowerFull +
|
||||
print(nicknameFollowing + '@' + domainFollowingFull + ': '
|
||||
'Follower ' + nicknameFollower + '@' + domainFollowerFull +
|
||||
' was removed')
|
||||
return True
|
||||
|
||||
|
|
Loading…
Reference in New Issue