Skip to content

Commit e6dd0ed

Browse files
committed
Fix error printing objects when property is not iterable
1 parent 7efc663 commit e6dd0ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/springpython/config/_yaml_config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import types
1818
import inspect
1919
import logging
20+
import collections
2021

2122
from _config_base import *
2223
from springpython.context import scope
@@ -247,7 +248,7 @@ def _print_obj(self, obj, level=0):
247248
if "properties" in obj:
248249
self.logger.debug("%sproperties:" % ("\t"*(level+1)))
249250
for prop in obj["properties"].keys():
250-
if "object" in obj["properties"][prop]:
251+
if isinstance(obj["properties"][prop], collections.Iterable) and "object" in obj["properties"][prop]:
251252
self.logger.debug("%s%s = ..." % ("\t"*(level+2), prop))
252253
self._print_obj(obj["properties"][prop], level+3)
253254
else:

0 commit comments

Comments
 (0)