From 93bc639f9e61ffe57fdfc4ae6a77ca8d0c61c6ac Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 8 Sep 2011 10:34:28 -0400 Subject: [PATCH] Fix dumping for ConfigListSetting (a subclass of ConfigSetting). --- h5config/config.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/h5config/config.py b/h5config/config.py index 66ba8ee..ce195e6 100644 --- a/h5config/config.py +++ b/h5config/config.py @@ -300,16 +300,16 @@ class Config (dict): name = setting.name value = self[name] try: - if isinstance(setting, ConfigSetting): - if value is not None: - lines.append(value.dump(help=help, prefix=prefix+' ')) - continue - elif isinstance(setting, ConfigListSetting): + if isinstance(setting, ConfigListSetting): if value: for config in value: lines.append( config.dump(help=help, prefix=prefix+' ')) continue + elif isinstance(setting, ConfigSetting): + if value is not None: + lines.append(value.dump(help=help, prefix=prefix+' ')) + continue value_string = setting.convert_to_text(self[name]) if help: help_string = '\t({})'.format(setting.help()) -- 2.26.2