From 761ac72831bcc01c1e72f48416c162221390d573 Mon Sep 17 00:00:00 2001 From: Rusko124 Date: Sat, 19 Dec 2020 17:33:22 +0600 Subject: [PATCH] Edits: debug webview only if WEBVIEW_DEBUG passed --- viewer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/viewer.py b/viewer.py index 73877a2f8..4b5b12a4b 100755 --- a/viewer.py +++ b/viewer.py @@ -26,7 +26,7 @@ from lib.github import fetch_remote_hash, remote_branch_available from lib.errors import SigalrmException from lib.media_player import VLCMediaPlayer, OMXMediaPlayer -from lib.utils import get_active_connections, url_fails, touch, is_balena_app, is_ci, get_node_ip +from lib.utils import get_active_connections, url_fails, touch, is_balena_app, is_ci, get_node_ip, string_to_bool from settings import settings, LISTEN, PORT, ZmqConsumer @@ -280,7 +280,9 @@ def view_image(uri): browser_bus.loadImage(uri) current_browser_url = uri logging.info('Current url is {0}'.format(current_browser_url)) - logging.info(browser.process.stdout) + + if string_to_bool(getenv('WEBVIEW_DEBUG', '0')): + logging.info(browser.process.stdout) def view_video(uri, duration):