mirror of https://gitlab.com/bashrc2/epicyon
No :
parent
ef7383a6bc
commit
b88ca1564e
|
@ -24,7 +24,7 @@ def manualDenyFollowRequest(baseDir: str,nickname: str,domain: str,denyHandle: s
|
||||||
return
|
return
|
||||||
if denyHandle not in open(approveFollowsFilename).read():
|
if denyHandle not in open(approveFollowsFilename).read():
|
||||||
return
|
return
|
||||||
approvefilenew = open(approveFollowsFilename+'.new', 'w+'):
|
approvefilenew = open(approveFollowsFilename+'.new', 'w+')
|
||||||
with open(approveFollowsFilename, 'r') as approvefile:
|
with open(approveFollowsFilename, 'r') as approvefile:
|
||||||
for approveHandle in approvefile:
|
for approveHandle in approvefile:
|
||||||
if not approveHandle.startswith(denyHandle):
|
if not approveHandle.startswith(denyHandle):
|
||||||
|
@ -43,7 +43,7 @@ def addHandleToApproveFile(baseDir: str,nickname: str,domain: str,addHandle: str
|
||||||
if os.path.isfile(approveFollowsFilename):
|
if os.path.isfile(approveFollowsFilename):
|
||||||
if addHandle in open(approveFollowsFilename).read():
|
if addHandle in open(approveFollowsFilename).read():
|
||||||
appendHandle=False
|
appendHandle=False
|
||||||
approvefilenew = open(approveFollowsFilename+'.add', 'w+'):
|
approvefilenew = open(approveFollowsFilename+'.add', 'w+')
|
||||||
with open(approveFollowsFilename, 'r') as approvefile:
|
with open(approveFollowsFilename, 'r') as approvefile:
|
||||||
for handle in approvefile:
|
for handle in approvefile:
|
||||||
approvefilenew.write(handle)
|
approvefilenew.write(handle)
|
||||||
|
@ -73,7 +73,7 @@ def manualApproveFollowRequest(session,baseDir: str, \
|
||||||
if debug:
|
if debug:
|
||||||
print(handle+' not in '+approveFollowsFilename)
|
print(handle+' not in '+approveFollowsFilename)
|
||||||
return
|
return
|
||||||
approvefilenew = with open(approveFollowsFilename+'.new', 'w+'):
|
approvefilenew = with open(approveFollowsFilename+'.new', 'w+')
|
||||||
with open(approveFollowsFilename, 'r') as approvefile:
|
with open(approveFollowsFilename, 'r') as approvefile:
|
||||||
for handle in approvefile:
|
for handle in approvefile:
|
||||||
if handle.startswith(approveHandle):
|
if handle.startswith(approveHandle):
|
||||||
|
|
Loading…
Reference in New Issue