def mount(self, db_name):
        db_uid = self.index['name_to_uid'][db_name] if db_name in self.index['name_to_uid'] else None

        if self[db_uid]['status'] == self.STATUSES.UNMOUNTED:
            db_path = self[db_uid]['path']
            connector = self._get_db_connector(db_path)

            if connector is None:
                return failure(DATABASE_ERROR, "Database %s could not be mounted" % db_path)

            self[db_uid]['status'] = self.STATUSES.MOUNTED
            self[db_uid]['connector'] = leveldb.LevelDB(db_path)
        else:
            return failure(DATABASE_ERROR, "Database %r already mounted" % db_name)

        return success()
dataset/ETHPy150Open oleiade/Elevator/debian/elevator/usr/lib/python2.6/dist-packages/elevator/db.py/DatabasesHandler.mount/original