v6.5.0-alpha_RC2

This commit is contained in:
SuperSonic 2019-08-27 15:59:51 +08:00
parent 1985c8f4ed
commit 9f286fe7b0

View file

@ -131,15 +131,15 @@ class Yuuki_Data:
return time.strftime(format, Time) return time.strftime(format, Time)
def getData(self, Type, Query=None): def getData(self, Type, Query=None):
if type(Query) == list: if Query != None:
if len(Query) == 1: if type(Query) == str:
if Query not in self.Data[Type]: if Query not in self.Data[Type]:
if Type in self.initType: if Type in self.initType:
self.Data[Type][Query] = self.initType[Type] self.Data[Type][Query] = self.initType[Type]
else: else:
assert "Unknown DataType" assert "Unknown DataType"
return self.Data[Type][Query] return self.Data[Type][Query]
elif len(Query) == 2: elif type(Query) == list and len(Query) == 2:
if Query[0] not in self.Data[Type]: if Query[0] not in self.Data[Type]:
if Type in self.initType: if Type in self.initType:
self.Data[Type][Query[0]] = self.initType[Type] self.Data[Type][Query[0]] = self.initType[Type]
@ -152,7 +152,7 @@ class Yuuki_Data:
assert "Unknown DataType" assert "Unknown DataType"
return self.Data[Type][Query[0]][Query[1]] return self.Data[Type][Query[0]][Query[1]]
else: else:
assert "Error Query Level" assert "Error Query"
else: else:
return self.Data[Type] return self.Data[Type]