diff --git a/README.md b/README.md
index e079dc1..0c44369 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
Star Yuuki(pYthon) BOT - Yuuki
==================
-![Version](https://img.shields.io/badge/v6.5.2-OpenSource-FF0033.svg) ![Series](https://img.shields.io/badge/syb_Yuuki-Series-7700FF.svg) ![License](https://img.shields.io/badge/license-MPL--2.0-FF6600.svg) ![Python](https://img.shields.io/badge/python-3.x-0066FF.svg) ![Platform](https://img.shields.io/badge/base_on-LINE-00DD00.svg)
+![Version](https://img.shields.io/badge/v6.5.2-OpenSource-FF0033.svg) ![Series](https://img.shields.io/badge/syb-Series-7700FF.svg) ![License](https://img.shields.io/badge/license-MPL--2.0-FF6600.svg) ![Python](https://img.shields.io/badge/python-3.x-0066FF.svg) ![Platform](https://img.shields.io/badge/base_on-LINE-00DD00.svg)
A Python BOT for LINE Group Protection with LINE Unofficial API.
![ICON](logo.png)
@@ -21,6 +21,7 @@ Recommand Environment:
Ubuntu >= 18.04
python >= 3.7
pip >= 19.2
+ git >= 2.17
You need the "LINE Unofficial API Core for Python". (Ex:[olsb](https://github.com/star-inc/olsb_cores), [akad](https://pypi.org/project/akad), [curve](https://pypi.org/project/curve) ...)
diff --git a/libs/data.py b/libs/data.py
index fe35367..3f63ecc 100644
--- a/libs/data.py
+++ b/libs/data.py
@@ -155,7 +155,7 @@ class Yuuki_Data:
def _local_query(self, query_data):
if type(query_data) is list:
- result = self.Data.copy()
+ result = self.Data
query_len = len(query_data)
source_data = self.Data
for count, key in enumerate(query_data):
@@ -189,8 +189,7 @@ class Yuuki_Data:
def syncData(self):
if self.threading:
- sync = self._mdsShake("GET", [])
- self.Data = sync.get("data")
+ self.Data = self.getData([])
for Type in self.DataType:
with self.file(Type, "w", "Data") as f:
f.write(json.dumps(self.Data[Type]))
@@ -204,19 +203,22 @@ class Yuuki_Data:
def _updateData(self, path, data):
assert path and type(path) is list, "Empty path - updateData"
if len(path) == 1:
- origin = self.getData([]).copy()
+ origin_data = self.getData([])
+ assert type(origin_data) is dict, "Error origin data type (1) - updateData"
+ origin = origin_data.copy()
origin[path[0]] = data
- data = origin
+ path = []
else:
- origin = self.getData(path[:-1]).copy()
+ origin_data = self.getData(path[:-1])
+ assert type(origin_data) is dict, "Error origin data type (2) - updateData"
+ origin = origin_data.copy()
origin[path[-1]] = data
path = path[:-1]
- data = origin
- assert type(data) == dict, "Error data type - updateData"
+ assert type(origin) is dict, "Error request data type - updateData"
if self.threading:
- self._mdsShake("UPT", path, data)
+ self._mdsShake("UPT", path, origin)
else:
- self._local_update(path, data)
+ self._local_update(path, origin)
def updateLog(self, Type, Data):
if self.threading:
diff --git a/libs/data_mds.py b/libs/data_mds.py
index a1bb450..1ddad59 100644
--- a/libs/data_mds.py
+++ b/libs/data_mds.py
@@ -3,7 +3,7 @@
"""
Star Inc. multiprocessing data switching
===
- To switch data in multiprocessing tasks.
+ To switch data in multiprocessor tasks.
LICENSE: MPL 2.0
(c)2019 Star Inc.
@@ -49,7 +49,7 @@ def query(query_data, null=None):
global switch_data
try:
if type(switch_data) is dict and type(query_data) is list:
- result = switch_data.copy()
+ result = switch_data
query_len = len(query_data)
source_data = switch_data
for count, key in enumerate(query_data):
@@ -101,7 +101,7 @@ class IndexHandler(RequestHandler):
def get(self):
self.write('''
Python MDS Server
- To switch data in multiprocessing tasks.