From aa3c0f5fb8a7c20c0e715327c1b893026c8ff0d8 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 7 Aug 2019 18:02:28 +0100 Subject: [PATCH] Remove debug --- daemon.py | 7 ------- manualapprove.py | 8 -------- 2 files changed, 15 deletions(-) diff --git a/daemon.py b/daemon.py index 871c840e..d1a23d2a 100644 --- a/daemon.py +++ b/daemon.py @@ -749,22 +749,15 @@ class PubServer(BaseHTTPRequestHandler): self._redirect_headers(actor+'/inbox',cookie) return - print('88888888888888888888888888888888888888888888888888') - print(str(authorized)+' '+self.path) # send a follow request approval from the web interface if authorized and '/followapprove=' in self.path and self.path.startswith('/users/'): originPathStr=self.path.split('/followapprove=')[0] followerNickname=originPathStr.replace('/users/','') followingHandle=self.path.split('/followapprove=')[1] - print('*********************************************') - print('followingHandle: '+followingHandle) - print('followerNickname: '+followerNickname) if '@' in followingHandle: - print('Test1') if not self.server.session: self.server.session= \ createSession(self.server.domain,self.server.port,self.server.useTor) - print('Test2') manualApproveFollowRequest(self.server.session, \ self.server.baseDir, \ self.server.httpPrefix, \ diff --git a/manualapprove.py b/manualapprove.py index a22e9337..9ed9162e 100644 --- a/manualapprove.py +++ b/manualapprove.py @@ -44,7 +44,6 @@ def manualApproveFollowRequest(session,baseDir: str, \ debug: bool) -> None: """Manually approve a follow request """ - print('Test3') handle=nickname+'@'+domain accountsDir=baseDir+'/accounts/'+handle approveFollowsFilename=accountsDir+'/followrequests.txt' @@ -56,23 +55,18 @@ def manualApproveFollowRequest(session,baseDir: str, \ if debug: print(handle+' not in '+approveFollowsFilename) return - print('Test4') approvefilenew = open(approveFollowsFilename+'.new', 'w+') with open(approveFollowsFilename, 'r') as approvefile: for handle in approvefile: if handle.startswith(approveHandle): handle=handle.replace('\n','') - print('Test5: '+handle) port2=port if ':' in handle: port2=int(handle.split(':')[1]) requestsDir=accountsDir+'/requests' followActivityfilename=requestsDir+'/'+handle+'.follow' - print('Test6: '+followActivityfilename) if os.path.isfile(followActivityfilename): - print('Test7') with open(followActivityfilename, 'r') as fp: - print('Test8') followJson=commentjson.load(fp) approveNickname=approveHandle.split('@')[0] approveDomain=approveHandle.split('@')[1].replace('\n','') @@ -80,7 +74,6 @@ def manualApproveFollowRequest(session,baseDir: str, \ if ':' in approveDomain: approvePort=approveDomain.split(':')[1] approveDomain=approveDomain.split(':')[0] - print('Test9: '+approveNickname+' '+approveDomain+' '+approvePort+' '+followJson['actor']) followedAccountAccepts(session,baseDir,httpPrefix, \ nickname,domain,port, \ approveNickname,approveDomain,approvePort, \ @@ -89,7 +82,6 @@ def manualApproveFollowRequest(session,baseDir: str, \ sendThreads,postLog, \ cachedWebfingers,personCache, \ debug) - print("Test10") os.remove(followActivityfilename) else: approvefilenew.write(handle)