empty options

This commit is contained in:
Muayyad Alsadi 2019-06-11 15:07:49 +03:00
parent a29cf06436
commit 9294bea425

View File

@ -75,7 +75,8 @@ def parse_short_mount(mount_str, basedir):
# Named volume # Named volume
# - datavolume:/var/lib/mysql # - datavolume:/var/lib/mysql
mount_type = "volume" mount_type = "volume"
for opt in mount_opt.split(','): mount_opts = filter(lambda i:i, (mount_opt or '').split(','))
for opt in mount_opts:
if opt=='ro': mount_opt_dict["read_only"]=True if opt=='ro': mount_opt_dict["read_only"]=True
elif opt=='rw': mount_opt_dict["read_only"]=False elif opt=='rw': mount_opt_dict["read_only"]=False
elif propagation_re.match(opt): mount_opt_dict["bind"]=dict(propagation=opt) elif propagation_re.match(opt): mount_opt_dict["bind"]=dict(propagation=opt)