1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #1334 from dotcloud/1314-compat_broke-fix

Discard error when loading old container format
This commit is contained in:
Victor Vieux 2013-07-31 01:08:08 -07:00
commit cd9f7f29d1

View file

@ -266,7 +266,8 @@ func (container *Container) FromDisk() error {
return err
}
// Load container settings
if err := json.Unmarshal(data, container); err != nil {
// udp broke compat of docker.PortMapping, but it's not used when loading a container, we can skip it
if err := json.Unmarshal(data, container); err != nil && !strings.Contains(err.Error(), "docker.PortMapping") {
return err
}
return nil