diff options
Diffstat (limited to 'libbe/bug.py')
-rw-r--r-- | libbe/bug.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libbe/bug.py b/libbe/bug.py index 0f912cf..7418933 100644 --- a/libbe/bug.py +++ b/libbe/bug.py @@ -185,11 +185,11 @@ class Bug(settings_object.SavedSettingsObject): fset=_set_time, doc="An integer version of .time_string") - def _extra_strings_generator(self): - return [] def _extra_strings_check_fn(value): "Require an iterable full of strings" - if not hasattr(value, "__iter__"): + if value == settings_object.EMPTY: + return True + elif not hasattr(value, "__iter__"): return False for x in value: if type(x) not in types.StringTypes: @@ -200,7 +200,7 @@ class Bug(settings_object.SavedSettingsObject): self._prop_save_settings(old, new) @_versioned_property(name="extra_strings", doc="Space for an array of extra strings. Useful for storing state for functionality implemented purely in becommands/<some_function>.py.", - generator=_extra_strings_generator, + default=[], check_fn=_extra_strings_check_fn, change_hook=_extra_strings_change_hook, mutable=True) |