From 2c070164e3ee619f65b4d212758467ab58d2c22b Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sun, 31 Oct 2021 22:56:18 +0800 Subject: [PATCH] bin fix a bug --- bin.py | 12 ++++++------ list.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin.py b/bin.py index 35e7861..e03031c 100644 --- a/bin.py +++ b/bin.py @@ -36,29 +36,29 @@ async def card(context): msg_out.extend(["BIN:" + card_bin]) try: msg_out.extend(["卡品牌:" + bin_json['scheme']]) - except KeyError: + except (KeyError, TypeError): pass try: msg_out.extend(["卡类型:" + bin_json['type']]) - except KeyError: + except (KeyError, TypeError): pass try: msg_out.extend(["卡种类:" + bin_json['brand']]) - except KeyError: + except (KeyError, TypeError): pass try: msg_out.extend(["发卡行:" + bin_json['bank']["name"]]) - except KeyError: + except (KeyError, TypeError): pass try: if bin_json['prepaid']: msg_out.extend(["是否预付:是"]) else: msg_out.extend(["是否预付:否"]) - except KeyError: + except (KeyError, TypeError): pass try: msg_out.extend(["发卡国家:" + bin_json['country']['name']]) - except KeyError: + except (KeyError, TypeError): pass await context.edit("\n".join(msg_out)) diff --git a/list.json b/list.json index bfcb6da..5e9e3bb 100644 --- a/list.json +++ b/list.json @@ -582,7 +582,7 @@ }, { "name": "bin", - "version": "1.01", + "version": "1.02", "section": "daily", "maintainer": "paulkm", "size": "1.8 kb",