Title: [291065] trunk/Tools
- Revision
- 291065
- Author
- lmo...@igalia.com
- Date
- 2022-03-09 13:46:49 -0800 (Wed, 09 Mar 2022)
Log Message
[webkitcorepy] Prefer xdg-open to open in linux
https://bugs.webkit.org/show_bug.cgi?id=237655
Reviewed by Jonathan Bedard.
* Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py:
(Terminal.open_url):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (291064 => 291065)
--- trunk/Tools/ChangeLog 2022-03-09 21:06:23 UTC (rev 291064)
+++ trunk/Tools/ChangeLog 2022-03-09 21:46:49 UTC (rev 291065)
@@ -1,3 +1,13 @@
+2022-03-09 Lauro Moura <lmo...@igalia.com>
+
+ [webkitcorepy] Prefer xdg-open to open in linux
+ https://bugs.webkit.org/show_bug.cgi?id=237655
+
+ Reviewed by Jonathan Bedard.
+
+ * Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py:
+ (Terminal.open_url):
+
2021-12-07 Zhifei Fang <facetothef...@gmail.com>
[results.webkit.org]Add selection box for results database.
Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py (291064 => 291065)
--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py 2022-03-09 21:06:23 UTC (rev 291064)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py 2022-03-09 21:46:49 UTC (rev 291065)
@@ -131,7 +131,12 @@
if sys.platform.startswith('win'):
process = run(['explorer', url])
else:
- process = run(['open', url])
+ # TODO: Use shutil directly when Python 2.7 is removed
+ from whichcraft import which
+ if sys.platform.startswith('linux') and which('xdg-open'):
+ process = run(['xdg-open', url])
+ else:
+ process = run(['open', url])
return True if process.returncode == 0 else False
class Text(object):
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes