Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#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:


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)

Change History (1)

comment:1 Changed 12 years ago by Peter Kropf

Resolution: fixed
Status: newclosed

Fixed with changeset:550.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Peter Kropf.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.