Update of /cvsroot/pybot/pybot/pybot
In directory sc8-pr-cvs1:/tmp/cvs-serv4664/pybot
Modified Files:
__init__.py sqlitedb.py
Log Message:
- Fixed bugs in the recently introduced functionality.
- Made plock.py and freshmeat.py get configuration from the config file.
Index: __init__.py
===================================================================
RCS file: /cvsroot/pybot/pybot/pybot/__init__.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** __init__.py 8 May 2003 18:30:59 -0000 1.4
--- __init__.py 8 May 2003 19:11:34 -0000 1.5
***************
*** 41,55 ****
defaults = config.defaults()
- db = SQLiteDB()
-
if os.path.isfile("./pybot.conf") and os.path.isdir("pybot"):
config.read("./pybot.conf")
defaults["datadir"] = os.path.abspath("./data")
! elif os.path.isfile(os.path.expanduser("~/.pybot/pybot.conf")):
! config.read(os.path.expanduser("~/.pybot/pybot.conf"))
defaults["datadir"] = os.path.expanduser("~/.pybot/data")
elif os.path.isfile("/etc/pybot.conf"):
config.read("/etc/pybot.conf")
! defaults["datadir"] = ("/usr/share/pybot")
main = Main()
--- 41,55 ----
defaults = config.defaults()
if os.path.isfile("./pybot.conf") and os.path.isdir("pybot"):
config.read("./pybot.conf")
defaults["datadir"] = os.path.abspath("./data")
! elif os.path.isfile(os.path.expanduser("~/.pybot/config")):
! config.read(os.path.expanduser("~/.pybot/config"))
defaults["datadir"] = os.path.expanduser("~/.pybot/data")
elif os.path.isfile("/etc/pybot.conf"):
config.read("/etc/pybot.conf")
! defaults["datadir"] = ("/var/lib/pybot")
!
! db = SQLiteDB()
main = Main()
Index: sqlitedb.py
===================================================================
RCS file: /cvsroot/pybot/pybot/pybot/sqlitedb.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** sqlitedb.py 8 May 2003 18:30:59 -0000 1.1
--- sqlitedb.py 8 May 2003 19:11:34 -0000 1.2
***************
*** 17,26 ****
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! from pybot import config
import sqlite
class SQLiteDB:
def __init__(self):
! self._path = config.get("sqlite", "path")
self._conn = sqlite.connect(self._path)
self._conn.autocommit = 1
--- 17,26 ----
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! import pybot
import sqlite
class SQLiteDB:
def __init__(self):
! self._path = pybot.config.get("sqlite", "path")
self._conn = sqlite.connect(self._path)
self._conn.autocommit = 1
|