diff --git a/ext_scripts/ext_rbd.py b/ext_scripts/ext_rbd.py index 38f576a2b8f78b614d62824a459e57371017c115..5d801514b9198459207213d07174fbc051459a58 100755 --- a/ext_scripts/ext_rbd.py +++ b/ext_scripts/ext_rbd.py @@ -297,7 +297,7 @@ def format_qemu_uri(name, pool=None, cephx=None, conf_file=None, cache=None, uri = 'kvm:rbd:%s' % RBD.format_name(name, pool=pool) extra_conf = '' # Only id is supported for cephx authentication, for the userspace URI. - if cephx['id']: + if cephx.get('id'): extra_conf += ':id=%s' % cephx['id'] if conf_file: extra_conf += ':conf=%s' % conf_file