Title: [245172] trunk/Tools
- Revision
- 245172
- Author
- ape...@igalia.com
- Date
- 2019-05-10 07:42:27 -0700 (Fri, 10 May 2019)
Log Message
[Flatpak] Use the safe PyYAML loader if available
https://bugs.webkit.org/show_bug.cgi?id=197771
Reviewed by Philippe Normand.
* flatpak/flatpakutils.py:
(load_manifest): Use yaml.safe_load() if available, with yaml.load()
still used as fallback when the former is not provided by the module.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (245171 => 245172)
--- trunk/Tools/ChangeLog 2019-05-10 06:44:13 UTC (rev 245171)
+++ trunk/Tools/ChangeLog 2019-05-10 14:42:27 UTC (rev 245172)
@@ -1,3 +1,14 @@
+2019-05-10 Adrian Perez de Castro <ape...@igalia.com>
+
+ [Flatpak] Use the safe PyYAML loader if available
+ https://bugs.webkit.org/show_bug.cgi?id=197771
+
+ Reviewed by Philippe Normand.
+
+ * flatpak/flatpakutils.py:
+ (load_manifest): Use yaml.safe_load() if available, with yaml.load()
+ still used as fallback when the former is not provided by the module.
+
2019-05-09 Fujii Hironori <hironori.fu...@sony.com>
WinCairo WebKitTestRunner should take platform/wk2/TestExpectations into account
Modified: trunk/Tools/flatpak/flatpakutils.py (245171 => 245172)
--- trunk/Tools/flatpak/flatpakutils.py 2019-05-10 06:44:13 UTC (rev 245171)
+++ trunk/Tools/flatpak/flatpakutils.py 2019-05-10 14:42:27 UTC (rev 245172)
@@ -155,8 +155,8 @@
contents = contents % {"COMMAND": command, "PORTNAME": port_name}
if is_yaml:
import yaml
-
- manifest = yaml.load(contents)
+ yaml_load = getattr(yaml, "safe_load", yaml.load)
+ manifest = yaml_load(contents)
else:
contents = remove_comments(contents)
manifest = json.loads(contents)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes