Version 3.11
[packages/centos7/PyYAML.git] / PyYAML-CVE-2014-9130.patch
1 # HG changeset patch
2 # User Kirill Simonov <xi@resolvent.net>
3 # Date 1417197216 21600
4 # Node ID ddf211a41bb231c365fece5599b7e484e6dc33fc
5 # Parent  263dff6f9664ccdc532283ba5c7b282c0e436a7b
6 Removed invalid simple key assertion.
7
8 diff --git a/lib/yaml/scanner.py b/lib/yaml/scanner.py
9 --- a/lib/yaml/scanner.py
10 +++ b/lib/yaml/scanner.py
11 @@ -297,10 +297,6 @@
12          # Check if a simple key is required at the current position.
13          required = not self.flow_level and self.indent == self.column
14  
15 -        # A simple key is required only if it is the first token in the current
16 -        # line. Therefore it is always allowed.
17 -        assert self.allow_simple_key or not required
18 -
19          # The next token might be a simple key. Let's save it's number and
20          # position.
21          if self.allow_simple_key:
22 diff --git a/lib3/yaml/scanner.py b/lib3/yaml/scanner.py
23 --- a/lib3/yaml/scanner.py
24 +++ b/lib3/yaml/scanner.py
25 @@ -297,10 +297,6 @@
26          # Check if a simple key is required at the current position.
27          required = not self.flow_level and self.indent == self.column
28  
29 -        # A simple key is required only if it is the first token in the current
30 -        # line. Therefore it is always allowed.
31 -        assert self.allow_simple_key or not required
32 -
33          # The next token might be a simple key. Let's save it's number and
34          # position.
35          if self.allow_simple_key: