Title: [233395] trunk/Tools
Revision
233395
Author
[email protected]
Date
2018-06-30 07:24:22 -0700 (Sat, 30 Jun 2018)

Log Message

Make check_flatpak() not verbose when only trying to run command inside flatpak
https://bugs.webkit.org/show_bug.cgi?id=187187

Patch by Thibault Saunier <[email protected]> on 2018-06-30
Reviewed by Michael Catanzaro.

* flatpak/flatpakutils.py:
(run_in_sandbox_if_available):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (233394 => 233395)


--- trunk/Tools/ChangeLog	2018-06-30 13:43:26 UTC (rev 233394)
+++ trunk/Tools/ChangeLog	2018-06-30 14:24:22 UTC (rev 233395)
@@ -1,3 +1,13 @@
+2018-06-30  Thibault Saunier  <[email protected]>
+
+        Make check_flatpak() not verbose when only trying to run command inside flatpak
+        https://bugs.webkit.org/show_bug.cgi?id=187187
+
+        Reviewed by Michael Catanzaro.
+
+        * flatpak/flatpakutils.py:
+        (run_in_sandbox_if_available):
+
 2018-06-29  Daniel Bates  <[email protected]>
 
         build-webkit: Perl "use of uninitialized value $previousContents"

Modified: trunk/Tools/flatpak/flatpakutils.py (233394 => 233395)


--- trunk/Tools/flatpak/flatpakutils.py	2018-06-30 13:43:26 UTC (rev 233394)
+++ trunk/Tools/flatpak/flatpakutils.py	2018-06-30 14:24:22 UTC (rev 233395)
@@ -75,7 +75,7 @@
         sys.stdout.flush()
 
 
-def check_flatpak():
+def check_flatpak(verbose=True):
     # Flatpak is only supported on Linux.
     if not sys.platform.startswith("linux"):
         return False
@@ -84,12 +84,13 @@
         try:
             output = subprocess.check_output([app, "--version"])
         except (subprocess.CalledProcessError, OSError):
-            Console.message("\n%sYou need to install %s >= %s"
-                            " to be able to use the '%s' script.\n\n"
-                            "You can find some informations about"
-                            " how to install it for your distribution at:\n"
-                            "    * http://flatpak.org/%s\n", Colors.FAIL,
-                            app, required_version, sys.argv[0], Colors.ENDC)
+            if verbose:
+                Console.message("\n%sYou need to install %s >= %s"
+                                " to be able to use the '%s' script.\n\n"
+                                "You can find some informations about"
+                                " how to install it for your distribution at:\n"
+                                "    * http://flatpak.org/%s\n", Colors.FAIL,
+                                app, required_version, sys.argv[0], Colors.ENDC)
             return False
 
         def comparable_version(version):
@@ -810,7 +811,7 @@
     if is_sandboxed():
         return None
 
-    if not check_flatpak():
+    if not check_flatpak(verbose=False):
         return None
 
     flatpak_runner = WebkitFlatpak.load_from_args(args)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to