From f4700e719e325166897f3c2f61c40ce7e272239f Mon Sep 17 00:00:00 2001 From: JiaJunsu Date: Sat, 1 Sep 2018 08:09:07 -0700 Subject: [PATCH] Fix mitama location check bug --- calculator_of_Onmyoji/load_data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/calculator_of_Onmyoji/load_data.py b/calculator_of_Onmyoji/load_data.py index 95e7ad9..2a03e3a 100644 --- a/calculator_of_Onmyoji/load_data.py +++ b/calculator_of_Onmyoji/load_data.py @@ -129,8 +129,8 @@ def sep_mitama_by_loc(mitama_data): for d_k, d_v in mitama_data.items(): loc = int(d_v[u'位置']) - if loc not in range(1, 6): - print('Mitama location must be 1 to 6, please check you data.') + if loc not in mitama_loc_data: + print('Mitama location must be 1 to 6, please check your data.') mitama_loc_data[loc].append({d_k: d_v}) return mitama_loc_data