scripts: ssl_session_reset_check: return exception if parsing of preprocessor directive fails

If next(lines) return StopIteration while processing a preprocessor
directive then that's an expected failure that should be reported to
the user.

Signed-off-by: Valerio Setti <[email protected]>
This commit is contained in:
Valerio Setti
2026-06-24 09:00:45 +02:00
parent 627e24b106
commit 1f94e7e30a
@@ -183,7 +183,8 @@ class CStruct:
try:
argument = argument[:-1] + ' ' + next(lines)[1]
except StopIteration:
break
raise Exception(f'Unexpected end of the structure reached while '
' parsing a C preprocessor directive')
return argument
def _structure_fields(self,