Handle missing 'type' key on 'mounts'

Change-Id: I79b4a9c59446a4d01a71902e174c09efb6c6b05d
Closes-Bug: #1813517
This commit is contained in:
Hongbin Lu 2019-01-28 03:44:46 +00:00
parent 56d7bf2c84
commit 996de23b77
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ class ContainerManager(base.Manager):
mounts = kwargs.get('mounts', None)
if mounts:
for mount in mounts:
if mount['type'] == 'bind':
if mount.get('type') == 'bind':
mount['source'] = utils.encode_file_data(mount['source'])
def delete(self, id, **kwargs):