mirror of https://gitlab.com/bashrc2/epicyon
Consistent append
parent
7a0914253e
commit
28830ed660
2
auth.py
2
auth.py
|
@ -130,7 +130,7 @@ def storeBasicCredentials(baseDir: str, nickname: str, password: str) -> bool:
|
|||
os.rename(passwordFile + '.new', passwordFile)
|
||||
else:
|
||||
# append to password file
|
||||
with open(passwordFile, "a") as passfile:
|
||||
with open(passwordFile, 'a+') as passfile:
|
||||
passfile.write(storeStr + '\n')
|
||||
else:
|
||||
with open(passwordFile, "w") as passfile:
|
||||
|
|
|
@ -520,7 +520,7 @@ def storeFollowRequest(baseDir: str,
|
|||
approveFollowsFilename = accountsDir + '/followrequests.txt'
|
||||
if os.path.isfile(approveFollowsFilename):
|
||||
if approveHandle not in open(approveFollowsFilename).read():
|
||||
with open(approveFollowsFilename, "a") as fp:
|
||||
with open(approveFollowsFilename, 'a+') as fp:
|
||||
fp.write(approveHandle + '\n')
|
||||
else:
|
||||
if debug:
|
||||
|
|
2
inbox.py
2
inbox.py
|
@ -1581,7 +1581,7 @@ def populateReplies(baseDir: str, httpPrefix: str, domain: str,
|
|||
if numLines > maxReplies:
|
||||
return False
|
||||
if messageId not in open(postRepliesFilename).read():
|
||||
repliesFile = open(postRepliesFilename, "a")
|
||||
repliesFile = open(postRepliesFilename, 'a+')
|
||||
repliesFile.write(messageId + '\n')
|
||||
repliesFile.close()
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue