def add(self, db_name, db_options=None):
        """Adds a db to the DatabasesHandler object, and sync it
        to the store file"""
        db_options = db_options or DatabaseOptions()
        cache_status, ratio = self._disposable_cache(db_options["block_cache_size"])
        if not cache_status:
            return failure(DATABASE_ERROR,
                           "Not enough disposable cache memory "
                           "%d Mo missing" % ratio)

        db_name_is_path = db_name.startswith('.') or ('/' in db_name)
        is_abspath = lambda: not db_name.startswith('.') and ('/' in db_name)

        # Handle case when a db is a path
        if db_name_is_path:
            if not is_abspath():
                return failure(DATABASE_ERROR, "Canno't create database from relative path")
            try:
                new_db_path = db_name
                if not os.path.exists(new_db_path):
                    os.mkdir(new_db_path)
            except OSError as e:
                return failure(OS_ERROR, e.strerror)
        else:
            new_db_path = os.path.join(self.dest, db_name)

        path = new_db_path
        connector = self._get_db_connector(path)

        if connector is None:
            return (DATABASE_ERROR, path % "Database %s could not be created")

        # Adding db to store, and updating handler
        uid = str(uuid.uuid4())
        options = db_options
        self.store_update(db_name, {
            'path': path,
            'uid': uid,
            'options': options,
        })

        self.index['name_to_uid'].update({db_name: uid})
        self.update({
            uid: {
                'connector': connector,
                'name': db_name,
                'path': path,
                'status': self.STATUSES.MOUNTED,
                'ref_count': 0,
            },
        })

        return success()
dataset/ETHPy150Open oleiade/Elevator/debian/elevator/usr/lib/python2.6/dist-packages/elevator/db.py/DatabasesHandler.add/swapped operands of `%`