progress removing onionr.py

This commit is contained in:
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 This also saves the used host (random localhost IP address) to the data folder in host.txt
''' '''
self.config = config self.config = config
self.serializer = serializeddata.SerializedData()
self.startTime = epoch.get_epoch() self.startTime = epoch.get_epoch()
app = flask.Flask(__name__) app = flask.Flask(__name__)
bindPort = int(config.get('client.client.port', 59496)) bindPort = int(config.get('client.client.port', 59496))

View File

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

View File

@ -116,4 +116,4 @@ class PrivateEndpoints:
@private_endpoints_bp.route('/gettorsocks') @private_endpoints_bp.route('/gettorsocks')
def get_tor_socks(): 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) events.event('insertdeniable', {'content': plaintext, 'meta': plaintextMeta, 'hash': retData, 'peer': bytesconverter.bytes_to_str(asymPeer)}, threaded = True)
else: else:
events.event('insertblock', {'content': plaintext, 'meta': plaintextMeta, 'hash': retData, 'peer': bytesconverter.bytes_to_str(asymPeer)}, threaded = True) events.event('insertblock', {'content': plaintext, 'meta': plaintextMeta, 'hash': retData, 'peer': bytesconverter.bytes_to_str(asymPeer)}, threaded = True)
return retData return retData