diff options
author | W. Trevor King <wking@drexel.edu> | 2009-07-21 16:22:34 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-07-21 16:22:34 -0400 |
commit | 86d74730ded314d960e0465f2eb50e5fb66c4767 (patch) | |
tree | 7f313f02de1ae8c91ce481575dbea29a54536169 /libbe/bugdir.py | |
parent | ec496bfc4337a7a490483afd32bc08901c8817b0 (diff) | |
parent | 2d29e2ae07322371c597ccac564e481a926a87ea (diff) | |
download | bugseverywhere-86d74730ded314d960e0465f2eb50e5fb66c4767.tar.gz |
Added .extra_strings to BugDir and Comment
Diffstat (limited to 'libbe/bugdir.py')
-rw-r--r-- | libbe/bugdir.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libbe/bugdir.py b/libbe/bugdir.py index 9802502..6e020ee 100644 --- a/libbe/bugdir.py +++ b/libbe/bugdir.py @@ -228,6 +228,20 @@ settings easy. Don't set this attribute. Set .rcs instead, and map[uuid] = None self._bug_map_value = map # ._bug_map_value used by @local_property + def _extra_strings_check_fn(value): + return utility.iterable_full_of_strings(value, \ + alternative=settings_object.EMPTY) + def _extra_strings_change_hook(self, old, new): + self.extra_strings.sort() # to make merging easier + 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.", + default=[], + check_fn=_extra_strings_check_fn, + change_hook=_extra_strings_change_hook, + mutable=True) + def extra_strings(): return {} + @Property @primed_property(primer=_bug_map_gen) @local_property("bug_map") |