Beispiel #1
0
 def get_siteconfig(self):
     if hasattr(self, 'site_config'):
         return
     site_file = self.conf.site_config
     site_config = DictIni(site_file)
     site_config.all = set([x for x in site_config.keys() if x and not x.startswith('_')])
     self.site_config = site_config
     log.debug('load site_conf %s', self.site_config.all)
     return
Beispiel #2
0
#! /usr/bin/env python
#coding=utf-8
import os
import sys

from appcfg import *
import urllib2
import getopt
import socket
timeout = 10
socket.setdefaulttimeout(timeout)
from pycomm.utils.dict4ini import DictIni

site_config = DictIni('site_config.ini')
path = 'makemoney'
action = 'update'

from_site = 'ttwait.sinaapp.com'

if __name__ == '__main__':
    appfile = os.path.join(path, 'app.yaml')
    configfile = os.path.join(path, 'config.tpl')
    configcontent = file(configfile).read()
    configfile = os.path.join(path, 'config.py')
    appcontent = file(appfile).read().split('\n', 1)[1]
    sys.path = EXTRA_PATHS + sys.path
    script_path = 'appcfg.py'

    keys = sys.argv[1:]