~devvmh/mnemosyne-proj/pbienst

« back to all changes in this revision

Viewing changes to mnemosyne/openSM2sync/client.py

  • Committer: Peter.Bienstman at UGent
  • Date: 2016-10-12 13:50:27 UTC
  • Revision ID: peter.bienstman@ugent.be-20161012135027-urfzlj1qszrq5hrb
Fixes for minor bugs, reported by Devin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
331
331
            raise SyncError("Error: mismatched user ids.\n" + \
332
332
                "The first sync should happen on an empty database.\n" + \
333
333
                "Backup then delete the local database and try again.")
334
 
        #if self.server_info["database_version"] != client_info["database_version"]:
335
 
        #    raise SyncError("Error: database version mismatch.\n" + \
336
 
        #        "Upgrade client and server to latest version.")
337
 
        #if self.server_info["program_version"] != client_info["program_version"]:
338
 
        #    raise SyncError("Error: Mnemosyne version mismatch.\n" + \
339
 
        #        "Upgrade client and server to latest version.")           
 
334
        if self.server_info["database_version"] != client_info["database_version"]:
 
335
            raise SyncError("Error: database version mismatch.\n" + \
 
336
                "Upgrade client and server to latest version.")
 
337
        if self.server_info["program_version"] != client_info["program_version"]:
 
338
            raise SyncError("Error: Mnemosyne version mismatch.\n" + \
 
339
                "Upgrade client and server to latest version.")           
340
340
        self.database.create_if_needed_partnership_with(\
341
341
            self.server_info["machine_id"])
342
342
        self.database.merge_partners(self.server_info["partners"])