Skip to content

Commit

Permalink
fix KeyError: 'EndTime'
Browse files Browse the repository at this point in the history
  • Loading branch information
starsliao authored Oct 9, 2023
1 parent b2ebb99 commit 15aaf06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flask-consul/units/cloud/alicloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def redis(account,region):
'itype':i['ArchitectureType'],
'ver':i['EngineVersion'],
'mem':f"{i['Capacity']}MB",
'exp': '-' if i['EndTime'] == None else i['EndTime'].split('T')[0]
'exp': '-' if i.get('EndTime',None) == None else i.get('EndTime','-T').split('T')[0]
} for i in redisbase_list}
redis_dict.update(redis_dict_temp)
if PageNumber == 1:
Expand Down

0 comments on commit 15aaf06

Please sign in to comment.