Browse Source

Code cleaning in the migration handler

Roland Haroutiounian 8 years ago
parent
commit
56e2dc1d5f
1 changed files with 2 additions and 3 deletions
  1. 2
    3
      plugins/mongodb_datasource/migration_handler.py

+ 2
- 3
plugins/mongodb_datasource/migration_handler.py View File

@@ -44,7 +44,6 @@ class MigrationHandler(object):
44 44
             or 'username' not in conn_args.keys() or 'password' not in conn_args.keys():
45 45
             raise MigrationHandlerError("Missing connection arguments")
46 46
 
47
-        #self.connection_name = conn_args['name']
48 47
         self.database = connect(host=conn_args['host'], port=conn_args['port'], db_name=conn_args['db_name'],
49 48
                                 username=conn_args['username'], password=conn_args['password'])
50 49
 
@@ -57,7 +56,7 @@ class MigrationHandler(object):
57 56
         self.drop_if_exists = kwargs['drop_if_exists'] if 'drop_is_exists' in kwargs else \
58 57
             MigrationHandler.MIGRATION_HANDLER_DEFAULT_SETTINGS['drop_if_exists']
59 58
 
60
-        self.init_collections_names = self._set_init_collection_names()
59
+        self._set_init_collection_names()
61 60
 
62 61
     def _set_init_collection_names(self):
63 62
         collection_names = ['relation']
@@ -66,7 +65,7 @@ class MigrationHandler(object):
66 65
                 and isinstance(dynclass._ro_datasource,MongoDbDatasource) \
67 66
                 and isinstance(dynclass._rw_datasource, MongoDbDatasource):
68 67
                 collection_names.append(dynclass.__name__)
69
-        return collection_names
68
+        self.init_collections_names = collection_names
70 69
 
71 70
     ## @brief Installs the basis collections of the database
72 71
     def init_db(self):

Loading…
Cancel
Save