X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=ovim.py;h=f896adc6a725e5e778fc5d86991cd47211cb05ee;hb=refs%2Fchanges%2F88%2F1388%2F1;hp=edd0b4caf3cf89db5ea6bcd37fa261cfd9455e67;hpb=50a052f5e3c1202e5c787851e8b2dd69d8f20629;p=osm%2Fopenvim.git diff --git a/ovim.py b/ovim.py index edd0b4c..f896adc 100644 --- a/ovim.py +++ b/ovim.py @@ -164,15 +164,16 @@ class ovim(): Start ovim services :return: """ + global database_version # if self.running_info: # return #TODO service can be checked and rebuild broken threads r = self.db.get_db_version() if r[0] < 0: raise ovimException("DATABASE is not a VIM one or it is a '0.0' version. Try to upgrade to version '{}' with "\ - "'./database_utils/migrate_vim_db.sh'".format(self.config["database_version"]) ) - elif r[1] != self.config["database_version"]: + "'./database_utils/migrate_vim_db.sh'".format(database_version) ) + elif r[1] != database_version: raise ovimException("DATABASE wrong version '{}'. Try to upgrade/downgrade to version '{}' with "\ - "'./database_utils/migrate_vim_db.sh'".format(r[1], self.config["database_version"]) ) + "'./database_utils/migrate_vim_db.sh'".format(r[1], database_version) ) # create database connection for openflow threads self.db_of = self._create_database_connection()