aboutsummaryrefslogtreecommitdiff
path: root/app/utils/bisect
diff options
context:
space:
mode:
authorMilo Casagrande <milo.casagrande@linaro.org>2015-02-02 16:31:11 +0100
committerMilo Casagrande <milo.casagrande@linaro.org>2015-02-02 16:31:11 +0100
commitb10e4e36e5a6267c64fd223b747a7b3ba2c1e8fc (patch)
treef76dc202847c7fa0274e6e72d953ff9f8db48465 /app/utils/bisect
parent6f2bf4e09edf31686fdcbd2a10c3b0f1fec2a681 (diff)
Add save function.
Change-Id: I970aec9254d4e31f34d98ad10eb707889cd2c27e
Diffstat (limited to 'app/utils/bisect')
-rw-r--r--app/utils/bisect/common.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/utils/bisect/common.py b/app/utils/bisect/common.py
index 0dacc1d..0938b10 100644
--- a/app/utils/bisect/common.py
+++ b/app/utils/bisect/common.py
@@ -33,6 +33,21 @@ BOOT_DEFCONFIG_SEARCH_FIELDS = [
]
+def save_bisect_doc(database, bisect_doc, doc_id):
+ """Save the provided bisect document.
+
+ :param database: The database connection.
+ :param bisect_doc: The document to save.
+ :param doc_id: The ID of the document.
+ """
+ return_code, saved_id = utils.db.save(
+ database, bisect_doc, manipulate=True)
+ if return_code == 201:
+ bisect_doc.id = saved_id
+ else:
+ utils.LOG.error("Error saving bisect data %s", doc_id)
+
+
def combine_defconfig_values(boot_doc, db_options):
"""Combine the boot document values with their own defconfing.