Update the exception catching type of the function
(cherry picked from commit 0a5ac9e286812581b0e616b2a0bc1f9407bb0a87)
This commit is contained in:
parent
f3a5418911
commit
4b08652307
@ -0,0 +1,25 @@
|
|||||||
|
From b0dbdbf4c4992308f738d6ea74a9e3e21fc65129 Mon Sep 17 00:00:00 2001
|
||||||
|
From: rabbitali <wenxin32@foxmail.com>
|
||||||
|
Date: Wed, 27 Dec 2023 10:39:30 +0800
|
||||||
|
Subject: [PATCH] Update the exception catching type of the function
|
||||||
|
|
||||||
|
---
|
||||||
|
vulcanus/database/proxy.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/vulcanus/database/proxy.py b/vulcanus/database/proxy.py
|
||||||
|
index 94e9883..4e62527 100644
|
||||||
|
--- a/vulcanus/database/proxy.py
|
||||||
|
+++ b/vulcanus/database/proxy.py
|
||||||
|
@@ -108,7 +108,7 @@ class MysqlProxy(DataBaseProxy):
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
self._create_session()
|
||||||
|
- except sqlalchemy.exc.SQLAlchemyError as error:
|
||||||
|
+ except DatabaseConnectionFailed as error:
|
||||||
|
LOGGER.error(error)
|
||||||
|
return False
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,12 +1,13 @@
|
|||||||
Name: aops-vulcanus
|
Name: aops-vulcanus
|
||||||
Version: v1.3.1
|
Version: v1.3.1
|
||||||
Release: 3
|
Release: 4
|
||||||
Summary: A basic tool libraries of aops, including logging, configure and response, etc.
|
Summary: A basic tool libraries of aops, including logging, configure and response, etc.
|
||||||
License: MulanPSL2
|
License: MulanPSL2
|
||||||
URL: https://gitee.com/openeuler/%{name}
|
URL: https://gitee.com/openeuler/%{name}
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
Patch0001: 0001-update-ValidateRules.patch
|
Patch0001: 0001-update-ValidateRules.patch
|
||||||
Patch0002: 0002-add-error-catch-when-connect-pro.patch
|
Patch0002: 0002-add-error-catch-when-connect-pro.patch
|
||||||
|
Patch0003: 0003-update-the-exception-catching-type-of-the-function.patch
|
||||||
|
|
||||||
|
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
@ -62,6 +63,9 @@ cp -r scripts %{buildroot}/opt/aops/
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Dec 27 2023 wenxin<wenxin32@foxmail.com> - v1.3.1-4
|
||||||
|
- update the exception catching type of the function
|
||||||
|
|
||||||
* Sat Dec 23 2023 zhuyuncheng<zhuyuncheng@huawei.com> - v1.3.1-3
|
* Sat Dec 23 2023 zhuyuncheng<zhuyuncheng@huawei.com> - v1.3.1-3
|
||||||
- add Http connection error catch when connecting to prometheus
|
- add Http connection error catch when connecting to prometheus
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user