*** empty log message ***

svn path=/trunk/boinc/; revision=2255
This commit is contained in:
Karl Chen 2003-09-04 07:25:26 +00:00
parent 2c58f23917
commit 756f658e0a
3 changed files with 11 additions and 7 deletions

View File

@ -193,6 +193,14 @@ class RunStateFile(XMLConfig):
self.tasks.save() self.tasks.save()
default_xml = '<boinc></boinc>' default_xml = '<boinc></boinc>'
default_config_file = None
def default_config():
'''Reads the default config.xml and returns it.'''
global default_config_file
if not default_config_file:
default_config_file = ConfigFile().read()
return default_config_file
if __name__ == '__main__': if __name__ == '__main__':
config = ConfigFile().read() config = ConfigFile().read()
# print "setting config.enabled = True" # print "setting config.enabled = True"

View File

@ -600,9 +600,7 @@ def connect(config):
def connect_default_config(): def connect_default_config():
"""Connect using the default config.xml""" """Connect using the default config.xml"""
import configxml import configxml
config = configxml.ConfigFile().read() connect(configxml.default_config().config)
database.connect(config.config)
def close(): def close():
"""Closes the connection to the sql boinc and deletes the Boincdb object.""" """Closes the connection to the sql boinc and deletes the Boincdb object."""

View File

@ -33,12 +33,10 @@ add.py workunit (TODO)
add.py result (TODO) ''' add.py result (TODO) '''
import boinc_path_config import boinc_path_config
from Boinc import database, db_mid, configxml, util from Boinc import database, db_mid, util
import sys, os, getopt, md5, time import sys, os, getopt, md5, time
config = boinc_config.BoincConfig('../../projects/client_test/config.xml').read() database.connect_default_config()
database._connectp('boinc_client_test','','')
CREATE_TIME = ['?create_time', int(time.time())] CREATE_TIME = ['?create_time', int(time.time())]