diff options
Diffstat (limited to 'Lib/json/scanner.py')
-rw-r--r-- | Lib/json/scanner.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/json/scanner.py b/Lib/json/scanner.py index 23eef61b94..86426cde1a 100644 --- a/Lib/json/scanner.py +++ b/Lib/json/scanner.py @@ -29,7 +29,7 @@ def py_make_scanner(context): try: nextchar = string[idx] except IndexError: - raise StopIteration + raise StopIteration(idx) if nextchar == '"': return parse_string(string, idx + 1, strict) @@ -60,7 +60,7 @@ def py_make_scanner(context): elif nextchar == '-' and string[idx:idx + 9] == '-Infinity': return parse_constant('-Infinity'), idx + 9 else: - raise StopIteration + raise StopIteration(idx) def scan_once(string, idx): try: |