summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Snow2018-12-21 10:35:23 +0100
committerEric Blake2019-01-14 17:09:46 +0100
commit58ebcb65d8e38fd693bf1e58dd941a4d7a8dfdef (patch)
tree39a5c1d91842e1febb3dfd43071cdfdc207effb9
parentblock: remove 'x' prefix from experimental bitmap APIs (diff)
downloadqemu-58ebcb65d8e38fd693bf1e58dd941a4d7a8dfdef.tar.gz
qemu-58ebcb65d8e38fd693bf1e58dd941a4d7a8dfdef.tar.xz
qemu-58ebcb65d8e38fd693bf1e58dd941a4d7a8dfdef.zip
iotests.py: don't abort if IMGKEYSECRET is undefined
Instead of using os.environ[], use .get with a default of empty string to match the setup in check to allow us to import the iotests module (for debugging, say) without needing a crafted environment just to import the module. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20181221093529.23855-6-jsnow@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
-rw-r--r--tests/qemu-iotests/iotests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index d537538ba0..a34e66813a 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -63,7 +63,7 @@ socket_scm_helper = os.environ.get('SOCKET_SCM_HELPER', 'socket_scm_helper')
debug = False
luks_default_secret_object = 'secret,id=keysec0,data=' + \
- os.environ['IMGKEYSECRET']
+ os.environ.get('IMGKEYSECRET', '')
luks_default_key_secret_opt = 'key-secret=keysec0'