sqlite-3.6.20-1 unique constraint message

https://github.com/dotcloud/docker/issues/6551

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
This commit is contained in:
Vincent Batts 2014-06-19 15:24:22 -04:00
parent f78264e329
commit fae2508cfa

View file

@ -64,6 +64,11 @@ func IsNonUniqueNameError(err error) bool {
if strings.Contains(str, "UNIQUE constraint failed") && strings.Contains(str, "edge.name") {
return true
}
// sqlite-3.6.20-1.el6 returns:
// Set failure: Abort due to constraint violation: constraint failed
if strings.HasSuffix(str, "constraint failed") {
return true
}
return false
}