Formatting changes

This commit is contained in:
Kevin Froman 2020-09-07 03:18:23 +00:00
parent 15a66c7fb4
commit f8fcd6d4e5
3 changed files with 9 additions and 5 deletions

View File

@ -27,7 +27,8 @@ import filepaths
def handle_announce(request):
"""accept announcement posts, validating POW
clientAPI should be an instance of the clientAPI server running, request is a instance of a flask request
clientAPI should be an instance of the clientAPI server running,
request is a instance of a flask request
"""
resp = 'failure'
newNode = ''

View File

@ -31,7 +31,7 @@ class PublicEndpoints:
@public_endpoints_bp.route('/')
def banner():
# Display a bit of information to people who visit a node address in their browser
# Display info to people who visit a node address in their browser
try:
with open('../static-data/index.html', 'r') as html:
resp = Response(html.read(), mimetype='text/html')
@ -55,7 +55,8 @@ class PublicEndpoints:
# A way to share files directly over your .onion
if not config.get("www.public.run", True):
abort(403)
return send_from_directory(config.get('www.public.path', 'static-data/www/public/'), path)
return send_from_directory(
config.get('www.public.path', 'static-data/www/public/'), path)
@public_endpoints_bp.route('/ping')
def ping():

View File

@ -88,7 +88,7 @@ class OnionrFlow:
return
def showOutput(self):
while type(self.channel) is type(None) and self.flowRunning:
while isinstance(self.channel, type(None)) and self.flowRunning:
time.sleep(1)
try:
while self.flowRunning:
@ -108,7 +108,9 @@ class OnionrFlow:
content = escapeansi.escape_ANSI(content.replace(
b'\n', b'\\n').replace(b'\r', b'\\r').strip().decode('utf-8'))
logger.info(block.getDate().strftime(
"%m/%d %H:%M") + ' - ' + logger.colors.reset + content, prompt=False, terminal=True)
"%m/%d %H:%M") + ' - ' +
logger.colors.reset + content,
prompt=False, terminal=True)
self.alreadyOutputed.append(b_hash)
time.sleep(5)
except KeyboardInterrupt: