qvm-tools: exit with code 1 on error

Not only print error message.
This commit is contained in:
Marek Marczykowski-Górecki 2013-11-19 18:40:16 +01:00
parent 25fd41aa2f
commit 92b479bf49

View File

@ -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: