From 109cbe5891777b70f110196280f62410dc902e00 Mon Sep 17 00:00:00 2001 From: "StarsL.cn" Date: Mon, 9 Oct 2023 14:40:23 +0800 Subject: [PATCH] Update alicloud.py fix #94 --- flask-consul/units/cloud/alicloud.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask-consul/units/cloud/alicloud.py b/flask-consul/units/cloud/alicloud.py index 04490cb..f95e1c4 100644 --- a/flask-consul/units/cloud/alicloud.py +++ b/flask-consul/units/cloud/alicloud.py @@ -286,7 +286,7 @@ def rds(account,region): 'status':i['DBInstanceStatus'], 'itype':i['DBInstanceType'], 'ver':i['EngineVersion'], - 'exp': '-' if i['ExpireTime'] == None else i['ExpireTime'].split('T')[0], + 'exp': '-' if i.get('ExpireTime',None) == None else i.get('ExpireTime','-T').split('T')[0], 'cpu':'无','mem':'无','disk':'无' } for i in rdsbase_list} rds_dict.update(rds_dict_temp)