2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-05 21:20:51 +00:00
This commit is contained in:
quadrismegistus 2020-09-13 12:26:27 +01:00
parent e63c6dfaf4
commit b40d568744

View File

@ -16,15 +16,12 @@ class TheSwitchboard(FlaskView, Logger):
@property
def op(self):
global OP_PASS
from komrade.backend.the_operator import TheOperator
if type(self)==TheOperator: return self
if hasattr(self,'_op'): return self._op
global OPERATOR,OPERATOR_KEYCHAIN
if OPERATOR: return OPERATOR
self._op=OPERATOR=TheOperator()
self.log(f'@Operator waiting for incoming calls on {OPERATOR_API_URL}...',pause=False)
return OPERATOR
@ -61,5 +58,4 @@ def run_forever(port='8080'):
# print(OPERATOR,'!?',OPERATOR.keychain())
app = Flask(__name__)
TheSwitchboard.register(app, route_base='/op/', route_prefix=None)
app.run(debug=False, port=port, host='0.0.0.0')
clear_screen()
app.run(debug=False, port=port, host='0.0.0.0')