diff options
author | John Snow <jsnow@redhat.com> | 2018-12-21 04:35:23 -0500 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2019-01-14 10:09:46 -0600 |
commit | 58ebcb65d8e38fd693bf1e58dd941a4d7a8dfdef (patch) | |
tree | 39a5c1d91842e1febb3dfd43071cdfdc207effb9 /tests/qemu-iotests | |
parent | 0e2b7f09837f1e2828d428af1e4ebb61e3b3ea5f (diff) |
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>
Diffstat (limited to 'tests/qemu-iotests')
-rw-r--r-- | tests/qemu-iotests/iotests.py | 2 |
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' |