From: John Snow Date: Fri, 21 Dec 2018 09:35:23 +0000 (-0500) Subject: iotests.py: don't abort if IMGKEYSECRET is undefined X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=58ebcb65d8e38fd693bf1e58dd941a4d7a8dfdef;p=qemu.git 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 Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20181221093529.23855-6-jsnow@redhat.com> Signed-off-by: Eric Blake --- 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'