From 2810ba00148fcf76990a46d2e8123ff2659570b1 Mon Sep 17 00:00:00 2001 From: Lior Stern Date: Fri, 25 Oct 2019 12:49:18 +0300 Subject: [PATCH] Check that /proc/version is readable before reading it in web_config. /proc/version may be unreadable in Android. --- share/tools/web_config/webconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py index 7d2107197..a4e9e09dc 100755 --- a/share/tools/web_config/webconfig.py +++ b/share/tools/web_config/webconfig.py @@ -43,7 +43,7 @@ def isMacOS10_12_5_OrLater(): def is_wsl(): """ Return whether we are running under the Windows Subsystem for Linux """ - if "linux" in platform.system().lower(): + if "linux" in platform.system().lower() and os.access("/proc/version", os.R_OK): with open("/proc/version", "r") as f: if "Microsoft" in f.read(): return True