~jfb-tempo-consulting/unifield-wm/sync-env-py3

« back to all changes in this revision

Viewing changes to run_last_sync.py

  • Committer: Olivier DOSSMANN
  • Date: 2013-09-17 07:21:50 UTC
  • Revision ID: od@tempo-consulting.fr-20130917072150-gld4t6ckxstgfvvb
[NEW] Scripts that create a synchronization environment, dump files and create an archive with dumps + some scripts to restore DB and launch an OpenERP server

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
                server=client,
48
48
                name=name,
49
49
                synchro={
50
 
                    'protocol' : 'xmlrpc',
 
50
                    'protocol' : 'netrpc',
51
51
                    'host' : config.server_host,
52
 
                    'port' : config.server_port,
 
52
                    'port' : config.netrpc_port,
53
53
                    'database' : Synchro.name,
54
54
                    'login' : name,
55
55
                    'password' : name,
56
56
                },
57
57
            )
58
58
            db.connect('admin')
59
 
            print("Syncing %s ..." % db.db_name)
 
59
            print "Syncing %s ..." % db.db_name
60
60
            db_creation.sync(db)
61
61
    else:
62
62
        for tc in test_cases:
63
63
            if issubclass(tc, client_creation):
64
 
                try:
65
 
                    tc.setUpClass()
66
 
                    tc.db.connect('admin')
67
 
                    print("Syncing %s ..." % tc.db.db_name)
68
 
                    tc.sync()
69
 
                except Exception as e:
70
 
                    print("Error", tc.db.db_name, e)
 
64
                tc.setUpClass()
 
65
                tc.db.connect('admin')
 
66
                print "Syncing %s ..." % tc.db.db_name
 
67
                tc.sync()
71
68