Modify ↓
#160 closed enhancement (fixed)
Cache settings should have default values
| Reported by: | Emmanuel Blot | Owned by: | Peter Kropf |
|---|---|---|---|
| Priority: | low | Component: | GraphvizPlugin |
| Severity: | trivial | Keywords: | |
| Cc: | Trac Release: |
Description
If the cache manager is enabled, the environment file needs to contain 4 cache values, or the GraphvizPlugin fails to execute.
It would be nice to provide default values for the cache settings.
The following block of code:
self.cache_max_size = int(self.config.get('graphviz', 'cache_max_size')) self.cache_min_size = int(self.config.get('graphviz', 'cache_min_size')) self.cache_max_count = int(self.config.get('graphviz', 'cache_max_count')) self.cache_min_count = int(self.config.get('graphviz', 'cache_min_count'))
fails if one (or more) cache setting is not defined in trac.ini because the int() method cannot coerce an empty string into a valid integer value. It would be nice to add default values to the self.config.get calls.
The graphvizplugin/0.9/Readme.txt file that comes with the package does not mention the cache_min_count setting with is nevertheless mandatory.
Attachments (0)
Note: See
TracTickets for help on using
tickets.



Fixed with changeset:550.