Merge pull request #950 from jackpgriffin/master
Skip creating swift container if already existsmaster
						commit
						61a4a1362c
					
				|  | @ -167,8 +167,12 @@ func New(params Parameters) (*Driver, error) { | ||||||
| 		return nil, fmt.Errorf("Swift authentication failed: %s", err) | 		return nil, fmt.Errorf("Swift authentication failed: %s", err) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if err := ct.ContainerCreate(params.Container, nil); err != nil { | 	if _, _, err := ct.Container(params.Container); err == swift.ContainerNotFound { | ||||||
| 		return nil, fmt.Errorf("Failed to create container %s (%s)", params.Container, err) | 		if err := ct.ContainerCreate(params.Container, nil); err != nil { | ||||||
|  | 			return nil, fmt.Errorf("Failed to create container %s (%s)", params.Container, err) | ||||||
|  | 		} | ||||||
|  | 	} else if err != nil { | ||||||
|  | 		return nil, fmt.Errorf("Failed to retrieve info about container %s (%s)", params.Container, err) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	d := &driver{ | 	d := &driver{ | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue