#!/usr/bin/env python
# Sync the ISC configuartion file and the SQL database
-# Copyright (C) 2000, 2001 James Troup <james@nocrew.org>
-# $Id: alyson,v 1.5 2001-09-27 14:42:02 troup Exp $
+# Copyright (C) 2000, 2001, 2002 James Troup <james@nocrew.org>
+# $Id: alyson,v 1.8 2002-05-03 16:06:45 troup Exp $
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
def main ():
global Cnf, projectB;
- apt_pkg.init();
+ Cnf = utils.get_conf()
- Cnf = apt_pkg.newConfiguration();
- apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file());
- Arguments = [('D',"debug","Alyson::Options::Debug", "IntVal"),
- ('h',"help","Alyson::Options::Help"),
- ('v',"version","Alyson::Options::Version")];
- apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv);
+ apt_pkg.ParseCommandLine(Cnf,[],sys.argv);
projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"]));
db_access.init(Cnf, projectB);