Commit 2f51213f authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Do not suppress JSON decode exceptions

parent 16f648ef
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -24,8 +24,12 @@ def import_from(context, items):
		add = (value and value[0] == '+')
		if add:
			value = value[1:]
		with suppress(ValueError):
		try:
			if value[0] in '[{"':
				value = json.loads(value)
		except (IndexError, ValueError) as exc:
			raise ValueError("""JSON decode error while decoding {}="{}": {}"""
					.format(name, value, exc))
		if cur and add:
			if __debug__:
				LOGGER.debug("adding %s to %s (= %s )", value, name, repr(cur))