Changeset 4404
- Timestamp:
- 10/06/08 12:37:24 (2 months ago)
- Files:
-
- graphvizplugin/0.11/graphviz/graphviz.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
graphvizplugin/0.11/graphviz/graphviz.py
r4403 r4404 74 74 # some additional processing, see `_load_config()` below. 75 75 76 77 cache_dir_option = Option("graphviz", "cache_dir", "gvcache", 78 """The directory that will be used to cache the generated images 79 (note that the directory must exist). 76 DEFAULT_CACHE_DIR = 'gvcache' 77 78 cache_dir_option = Option("graphviz", "cache_dir", DEFAULT_CACHE_DIR, 79 """The directory that will be used to cache the generated images. 80 Note that if different than the default (%s), this directory must 81 exist. 80 82 If not given as an absolute path, the path will be relative to 81 83 the Trac environment's directory. 82 """ )84 """ % DEFAULT_CACHE_DIR) 83 85 84 86 encoding = Option("graphviz", "encoding", 'utf-8', … … 448 450 449 451 if not os.path.exists(self.cache_dir): 450 return _("The cache_dir '%(path)s' doesn't exist, " 451 "please create it.", path=self.cache_dir) 452 if self.cache_dir_option == self.DEFAULT_CACHE_DIR: 453 os.mkdir(self.cache_dir) 454 else: 455 return _("The cache_dir '%(path)s' doesn't exist, " 456 "please create it.", path=self.cache_dir) 452 457 453 458 # Get optional configuration parameters from trac.ini.
