Ignore:
Timestamp:
Nov 1, 2009 11:07:11 AM (14 years ago)
Author:
mylan
Message:

#108: Refactored theme vars storage, some cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.themetemplate/trunk/quintagroup/themetemplate/localcommands/__init__.py

    r1005 r1357  
    44import os 
    55from ConfigParser import SafeConfigParser 
    6 from paste.script import pluginlib 
    76 
    87from zopeskel.base import var 
    98from zopeskel.localcommands import ZopeSkelLocalTemplate 
     9 
     10from quintagroup.themetemplate import getEggInfo 
     11from quintagroup.themetemplate import getThemeVarsFP 
    1012 
    1113class QThemeSubTemplate(ZopeSkelLocalTemplate): 
     
    5860 
    5961        res = {} 
    60         egg_info = pluginlib.find_egg_info_dir(output_dir) 
    61         theme_vars_fp = os.path.join(egg_info, 'theme_vars.txt') 
     62        egg_info = getEggInfo(output_dir) 
     63        theme_vars_fp = getThemeVarsFP(egg_info) 
    6264 
    63         if egg_info and os.path.exists(theme_vars_fp): 
     65        if os.path.exists(theme_vars_fp): 
    6466            config = SafeConfigParser() 
    6567            config.read(theme_vars_fp) 
     
    7779    def add_template_vars(self, output_dir, vars): 
    7880 
    79         egg_info = pluginlib.find_egg_info_dir(output_dir) 
    80         theme_vars_fp = os.path.join(egg_info, 'theme_vars.txt') 
     81        egg_info = getEggInfo(output_dir) 
     82        theme_vars_fp = getThemeVarsFP(egg_info) 
    8183 
    82         if egg_info and os.path.exists(theme_vars_fp): 
     84        if os.path.exists(theme_vars_fp): 
    8385            config = SafeConfigParser() 
    8486            config.read(theme_vars_fp) 
Note: See TracChangeset for help on using the changeset viewer.