~didrocks/+junk/oneconf

« back to all changes in this revision

Viewing changes to oneconf/packagesethandler.py

  • Committer: Didier Roche
  • Date: 2010-05-28 16:49:40 UTC
  • Revision ID: didier.roche@canonical.com-20100528164940-n2ddux3ekn7ly41c
first dbus implementation

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    Direct access to database for getting and updating the list
39
39
    """
40
40
 
41
 
    def __init__(self):
 
41
    def __init__(self, hosts=None):
42
42
        # Connect to CouchDB and create the database  
43
43
        self.database = CouchDatabase("oneconf_pkg", create=True)
44
 
        self.hosts = Hosts()
 
44
        self.hosts = hosts
 
45
        if not hosts:
 
46
            self.hosts = Hosts()
45
47
        self.distro = get_distro()
46
48
        self.current_time = time.time()
47
49