Merge branch 'master' of git://git.assembla.com/fpdb-sql

This commit is contained in:
Worros 2010-09-02 09:07:26 +08:00
commit befcbba8f2
2 changed files with 9 additions and 0 deletions

View File

@ -680,6 +680,7 @@ class Config:
sys.stderr.write(_("Configuration file %s not found. Using defaults.") % (file)) sys.stderr.write(_("Configuration file %s not found. Using defaults.") % (file))
file = None file = None
self.example_copy,example_file = True,None
if file is None: (file,self.example_copy,example_file) = get_config("HUD_config.xml", True) if file is None: (file,self.example_copy,example_file) = get_config("HUD_config.xml", True)
self.file = file self.file = file

View File

@ -26,6 +26,12 @@ import gobject
import os import os
import sys import sys
import time import time
import logging
# logging has been set up in fpdb.py or HUD_main.py, use their settings:
log = logging.getLogger("importer")
import fpdb_import import fpdb_import
from optparse import OptionParser from optparse import OptionParser
import Configuration import Configuration
@ -296,6 +302,7 @@ class GuiAutoImport (threading.Thread):
def addSites(self, vbox1, vbox2): def addSites(self, vbox1, vbox2):
the_sites = self.config.get_supported_sites() the_sites = self.config.get_supported_sites()
#log.debug("addSites: the_sites="+str(the_sites))
for site in the_sites: for site in the_sites:
pathHBox1 = gtk.HBox(False, 0) pathHBox1 = gtk.HBox(False, 0)
vbox1.pack_start(pathHBox1, False, True, 0) vbox1.pack_start(pathHBox1, False, True, 0)
@ -306,6 +313,7 @@ class GuiAutoImport (threading.Thread):
paths = self.config.get_default_paths(site) paths = self.config.get_default_paths(site)
self.createSiteLine(pathHBox1, pathHBox2, site, False, paths['hud-defaultPath'], params['converter'], params['enabled']) self.createSiteLine(pathHBox1, pathHBox2, site, False, paths['hud-defaultPath'], params['converter'], params['enabled'])
self.input_settings[site] = [paths['hud-defaultPath']] + [params['converter']] self.input_settings[site] = [paths['hud-defaultPath']] + [params['converter']]
#log.debug("addSites: input_settings="+str(self.input_settings))
if __name__== "__main__": if __name__== "__main__":
def destroy(*args): # call back for terminating the main eventloop def destroy(*args): # call back for terminating the main eventloop