mirror of
https://gitlab.com/bashrc2/epicyon
synced 2026-11-05 04:02:21 +00:00
Tidying
This commit is contained in:
1 parent
28830ed660
commit
a771ce3041
2 files changed
+5
-6
No files matched your search
@@ -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:
|
||||
|
||||
@@ -706,10 +706,9 @@ def receiveUndoFollow(session, baseDir: str, httpPrefix: str,
|
||||
nicknameFollowing, domainFollowingFull,
|
||||
nicknameFollower, domainFollowerFull,
|
||||
debug):
|
||||
if debug:
|
||||
print('DEBUG: Follower ' +
|
||||
nicknameFollower + '@' + domainFollowerFull +
|
||||
' was removed')
|
||||
print(nicknameFollowing + '@' + domainFollowingFull + ': '
|
||||
'Follower ' + nicknameFollower + '@' + domainFollowerFull +
|
||||
' was removed')
|
||||
return True
|
||||
|
||||
if debug:
|
||||
|
||||
Reference in new issue
Block a user