progress removing onionr.py

master
Kevin Froman 2019-08-05 11:30:19 -05:00
parent cbe10f914a
commit 6bf8bb1db6
4 changed files with 9 additions and 9 deletions

View File

@ -41,7 +41,6 @@ class PrivateAPI:
This also saves the used host (random localhost IP address) to the data folder in host.txt
'''
self.config = config
self.serializer = serializeddata.SerializedData()
self.startTime = epoch.get_epoch()
app = flask.Flask(__name__)
bindPort = int(config.get('client.client.port', 59496))

View File

@ -7,11 +7,12 @@ class FDSafeHandler(WSGIHandler):
self.timeout.start()
try:
WSGIHandler.handle(self)
except Exception as e:
self.handle_error(e)
finally:
self.timeout.close()
except gevent.Timeout as ex:
if ex is self.timeout:
pass
else:
raise
'''
def handle_error(self, two, three, four):
if two is self.timeout:
self.result = [b"Timeout"]
@ -19,3 +20,4 @@ class FDSafeHandler(WSGIHandler):
self.process_result()
else:
WSGIHandler.handle_error(self)
'''

View File

@ -116,4 +116,4 @@ class PrivateEndpoints:
@private_endpoints_bp.route('/gettorsocks')
def get_tor_socks():
return Response(client_api._too_many.get(NetController).socksPort)
return Response(str(client_api._too_many.get(NetController).socksPort))

View File

@ -144,5 +144,4 @@ def insert_block(data, header='txt', sign=False, encryptType='', symKey='', asym
events.event('insertdeniable', {'content': plaintext, 'meta': plaintextMeta, 'hash': retData, 'peer': bytesconverter.bytes_to_str(asymPeer)}, threaded = True)
else:
events.event('insertblock', {'content': plaintext, 'meta': plaintextMeta, 'hash': retData, 'peer': bytesconverter.bytes_to_str(asymPeer)}, threaded = True)
return retData