Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/pickletools.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def read_stringnl(f, decode=True, stripquotes=True, *, encoding='latin-1'):
for q in (b'"', b"'"):
if data.startswith(q):
if not data.endswith(q):
raise ValueError("strinq quote %r not found at both "
raise ValueError("string quote %r not found at both "
"ends of %r" % (q, data))
data = data[1:-1]
break
Expand Down
8 changes: 4 additions & 4 deletions Lib/test/test_pickletools.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,13 +394,13 @@ def test_string_without_quotes(self):
self.check_dis_error(b'Sabc"\n.', '',
"no string quotes around b'abc\"'")
self.check_dis_error(b"S'abc\n.", '',
'''strinq quote b"'" not found at both ends of b"'abc"''')
'''string quote b"'" not found at both ends of b"'abc"''')
self.check_dis_error(b'S"abc\n.', '',
r"""strinq quote b'"' not found at both ends of b'"abc'""")
r"""string quote b'"' not found at both ends of b'"abc'""")
self.check_dis_error(b"S'abc\"\n.", '',
r"""strinq quote b"'" not found at both ends of b'\\'abc"'""")
r"""string quote b"'" not found at both ends of b'\\'abc"'""")
self.check_dis_error(b"S\"abc'\n.", '',
r"""strinq quote b'"' not found at both ends of b'"abc\\''""")
r"""string quote b'"' not found at both ends of b'"abc\\''""")

def test_binstring(self):
self.check_dis(b"T\x03\x00\x00\x00abc.", '''\
Expand Down
Loading