From 92b479bf49e5f6c4529234ae4fb8f1a122ca8e8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 19 Nov 2013 18:40:16 +0100 Subject: [PATCH] qvm-tools: exit with code 1 on error Not only print error message. --- qvm-tools/qvm-prefs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qvm-tools/qvm-prefs b/qvm-tools/qvm-prefs index f21480a1..a186b73d 100755 --- a/qvm-tools/qvm-prefs +++ b/qvm-tools/qvm-prefs @@ -475,9 +475,12 @@ def main(): exit (1) property = args[1] - do_set(qvm_collection, vm, property, args[2:]) - qvm_collection.save() - qvm_collection.unlock_db() + if do_set(qvm_collection, vm, property, args[2:]): + qvm_collection.save() + qvm_collection.unlock_db() + else: + qvm_collection.unlock_db() + exit(1) else: