Merge pull request #6779 from ioito/hotfix/qx-huawei-cloudevent-succ

fix: 更正华为云操作成功判断
This commit is contained in:
Zexi Li
2020-06-10 10:45:46 +08:00
committed by GitHub
+3 -2
View File
@@ -16,7 +16,7 @@ package huawei
import (
"fmt"
"strings"
"strconv"
"time"
"yunion.io/x/jsonutils"
@@ -88,7 +88,8 @@ func (event *SEvent) GetAccount() string {
}
func (event *SEvent) IsSuccess() bool {
return strings.HasPrefix(event.Code, "2") || len(event.Code) == 0
code, _ := strconv.Atoi(event.Code)
return code < 400
}
func (event *SEvent) GetCreatedAt() time.Time {