comparison MoinMoin/theme/__init__.py @ 4212:1ca179133f01

Fix tests: small fixes after merge
author Florian Krupicka <florian.krupicka@googlemail.com>
date Wed, 09 Jul 2008 21:53:52 +0200
parents d9de4fa12f23
children a6c315ff8d66
comparison
equal deleted inserted replaced
4211:dde44d6e24ae 4212:1ca179133f01
1824 @rtype: Theme 1824 @rtype: Theme
1825 @return: a theme initialized for the request 1825 @return: a theme initialized for the request
1826 """ 1826 """
1827 if theme_name is None or theme_name == '<default>': 1827 if theme_name is None or theme_name == '<default>':
1828 theme_name = request.cfg.theme_default 1828 theme_name = request.cfg.theme_default
1829 1829
1830 try: 1830 try:
1831 Theme = wikiutil.importPlugin(request.cfg, 'theme', theme_name, 'Theme') 1831 Theme = wikiutil.importPlugin(request.cfg, 'theme', theme_name, 'Theme')
1832 except wikiutil.PluginMissingError: 1832 except wikiutil.PluginMissingError:
1833 raise ThemeNotFound(theme_name) 1833 raise ThemeNotFound(theme_name)
1834 1834
1841 @param theme_name: the name of the theme 1841 @param theme_name: the name of the theme
1842 @type theme_name: str 1842 @type theme_name: str
1843 @rtype: int 1843 @rtype: int
1844 @return: A statuscode for how successful the loading was 1844 @return: A statuscode for how successful the loading was
1845 0 - theme was loaded 1845 0 - theme was loaded
1846 1 - fallback to default theme 1846 1 - fallback to default theme
1847 2 - serious fallback to builtin theme 1847 2 - serious fallback to builtin theme
1848 """ 1848 """
1849 fallback = 0 1849 fallback = 0
1850 try: 1850 try:
1851 request.theme = load_theme(request, theme_name) 1851 request.theme = load_theme(request, theme_name)