Skip to content

Commit 2e00754

Browse files
committed
Fixed XML parsing issue with boolean arguments
1 parent c743e51 commit 2e00754

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

bbp/comps/xml_handler.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
"""
33
BSD 3-Clause License
44
5-
Copyright (c) 2021, University of Southern California
5+
Copyright (c) 2025, University of Southern California
66
All rights reserved.
77
88
Redistribution and use in source and binary forms, with or without
@@ -283,7 +283,13 @@ def parse_xml(xml_path):
283283
else:
284284
arg_val = arg.childNodes[0].data.strip()
285285
#print arg_val
286-
arg_impl = objName(arg_val)
286+
if arg_type == "bool":
287+
if str(arg_val).lower() == "false":
288+
arg_impl = False
289+
else:
290+
arg_impl = True
291+
else:
292+
arg_impl = objName(arg_val)
287293
if isinstance(arg_impl, str):
288294
# Expand any variables that we have
289295
arg_impl = expand_variables(arg_impl)

0 commit comments

Comments
 (0)