From 4a1013f2de49e478b797931bfe1885ce2ec97822 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 31 Oct 2017 14:23:10 +0000 Subject: [PATCH] swift: Allow configs with user id instead of user name --- swift/swift.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swift/swift.go b/swift/swift.go index c4312ffb2..ad862ecac 100644 --- a/swift/swift.go +++ b/swift/swift.go @@ -200,8 +200,8 @@ func swiftConnection(name string) (*swift.Connection, error) { return nil, errors.Wrap(err, "failed to read environment variables") } } - if c.UserName == "" { - return nil, errors.New("user not found") + if c.UserName == "" && c.UserId == "" { + return nil, errors.New("user name or user id not found") } if c.ApiKey == "" { return nil, errors.New("key not found")