Skip to content

Commit b0e2409

Browse files
committed
fix(jsonp) nasty bug due to forgotten swallowing ...
for list-scouters errors in set_path_value() (now collection-scouter is #0)!!!!
1 parent 20964b7 commit b0e2409

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

graphtik/jsonpointer.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -528,19 +528,18 @@ def set_path_value(
528528
except Exception as ex:
529529
if isinstance(ex, ValueError) and str(ex).startswith("Cannot modify"):
530530
raise
531-
if ii > 0: # ignore int-indexing
532-
log.debug(
533-
"scouter %s failed on step (#%i)%s of json-pointer(%r) with doc(%s), due to: %s",
534-
scouter,
535-
i,
536-
part,
537-
path,
538-
doc,
539-
ex,
540-
# Don't log int(part) stack-traces.
541-
exc_info=type(ex) is not ValueError
542-
or not str(ex).startswith("invalid literal for int()"),
543-
)
531+
log.debug(
532+
"scouter %s failed on step (#%i)%s of json-pointer(%r) with doc(%s), due to: %s",
533+
scouter,
534+
i,
535+
part,
536+
path,
537+
doc,
538+
ex,
539+
# Don't log int(part) stack-traces.
540+
exc_info=type(ex) is not ValueError
541+
or not str(ex).startswith("invalid literal for int()"),
542+
)
544543
else:
545544
raise ValueError(
546545
f'Failed setting step (#{i}) "{part}" of path {path!r}!'

0 commit comments

Comments
 (0)