Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#160 closed enhancement (fixed)

Cache settings should have default values

Reported by: eblot Owned by: pkropf
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)

Change History (1)

comment:1 Changed 8 years ago by pkropf

  • Resolution set to fixed
  • Status changed from new to closed

Fixed with changeset:550.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from pkropf. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.