comparison piecrust/themes/base.py @ 893:14cca285f73b

clean: PEP8.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 02 Jul 2017 22:20:48 -0700
parents 0b4eb0e37363
children 8adc27285d93
comparison
equal deleted inserted replaced
892:c445a3d5d950 893:14cca285f73b
1 import sys 1 import sys
2 import os.path 2 import os.path
3 import yaml 3 import yaml
4 from piecrust import CONFIG_PATH, THEME_DIR, THEMES_DIR 4 from piecrust import CONFIG_PATH, THEMES_DIR
5 5
6 6
7 class Theme(object): 7 class Theme(object):
8 def getPath(self): 8 def getPath(self):
9 mod_name = type(self).__module__ 9 mod_name = type(self).__module__
51 theme_dir = os.path.join(d, theme) 51 theme_dir = os.path.join(d, theme)
52 if os.path.isdir(theme_dir): 52 if os.path.isdir(theme_dir):
53 return theme_dir 53 return theme_dir
54 54
55 raise ThemeNotFoundError( 55 raise ThemeNotFoundError(
56 "Can't find theme '%s'. Looked in: %s" % 56 "Can't find theme '%s'. Looked in: %s" %
57 (theme, ', '.join(dirs))) 57 (theme, ', '.join(dirs)))
58 58