Mercurial > piecrust2
comparison piecrust/processing/util.py @ 999:46025a1b5434
plugins: Support multiple customizable plugins directories.
Also add support for specifying the theme directory in some customizable paths.
| author | Ludovic Chabant <ludovic@chabant.com> |
|---|---|
| date | Tue, 21 Nov 2017 09:54:56 -0800 |
| parents | cba781477bd0 |
| children | 5762a0b821ac |
comparison
equal
deleted
inserted
replaced
| 998:a49e6846e0da | 999:46025a1b5434 |
|---|---|
| 72 path_mode = config.get('path_mode', 'relative') | 72 path_mode = config.get('path_mode', 'relative') |
| 73 if path_mode == 'relative': | 73 if path_mode == 'relative': |
| 74 dirname, _ = os.path.split(path) | 74 dirname, _ = os.path.split(path) |
| 75 info.files = [os.path.join(dirname, f) for f in info.files] | 75 info.files = [os.path.join(dirname, f) for f in info.files] |
| 76 elif path_mode == 'absolute': | 76 elif path_mode == 'absolute': |
| 77 info.files = [os.path.join(self.app.root_dir, f) | 77 info.files = [self.app.resolvePath(f) for f in info.files] |
| 78 for f in info.files] | |
| 79 else: | 78 else: |
| 80 raise Exception("Unknown path mode: %s" % path_mode) | 79 raise Exception("Unknown path mode: %s" % path_mode) |
| 81 | 80 |
| 82 return info | 81 return info |
| 83 | 82 |
