Ejemplo n.º 1
0
def start_an_internet_update(step, firstdb, tribe, seconddb):
    if tribe == 'or':
        Distributor._Distributor__settings = QSettings(
                path.join(path.dirname(__file__), u'data', u'db1.conf'),
                QSettings.NativeFormat)
    elif tribe == 'and':
        Distributor._Distributor__settings = QSettings(
                path.join(path.dirname(__file__), u'data', u'db2.conf'),
                QSettings.NativeFormat)
    print "It is fetching things from internet and can take quite some time"
    dr = Distributor(world.database)
    dr.start()
    dr.wait()