mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=2255
This commit is contained in:
parent
2c58f23917
commit
756f658e0a
|
@ -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"
|
||||||
|
|
|
@ -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."""
|
||||||
|
|
|
@ -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())]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue