From f8fcd6d4e573a37b07af0f2bf42ab5462c724b78 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Mon, 7 Sep 2020 03:18:23 +0000 Subject: [PATCH] Formatting changes --- src/httpapi/miscpublicapi/announce.py | 3 ++- src/httpapi/miscpublicapi/endpoints.py | 5 +++-- static-data/default-plugins/circles/main.py | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/httpapi/miscpublicapi/announce.py b/src/httpapi/miscpublicapi/announce.py index c3ba80a7..29a78a43 100755 --- a/src/httpapi/miscpublicapi/announce.py +++ b/src/httpapi/miscpublicapi/announce.py @@ -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 = '' diff --git a/src/httpapi/miscpublicapi/endpoints.py b/src/httpapi/miscpublicapi/endpoints.py index f8db4b06..06f481fc 100644 --- a/src/httpapi/miscpublicapi/endpoints.py +++ b/src/httpapi/miscpublicapi/endpoints.py @@ -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(): diff --git a/static-data/default-plugins/circles/main.py b/static-data/default-plugins/circles/main.py index 07348ba4..51e7815a 100755 --- a/static-data/default-plugins/circles/main.py +++ b/static-data/default-plugins/circles/main.py @@ -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: