fix: out of scope blockStorageClient nil value issue

Co-Authored-By: Adrien Delorme <azr@users.noreply.github.com>
This commit is contained in:
Pratyush Singhal 2019-08-22 20:50:46 +05:30 committed by GitHub
parent bbd71136dc
commit dbb50337bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ func (s *stepCreateImage) Run(ctx context.Context, state multistep.StateBag) mul
var blockStorageClient *gophercloud.ServiceClient
if s.UseBlockStorageVolume {
// We need the v3 block storage client.
blockStorageClient, err := config.blockStorageV3Client()
blockStorageClient, err = config.blockStorageV3Client()
if err != nil {
err = fmt.Errorf("Error initializing block storage client: %s", err)
state.Put("error", err)