summaryrefslogtreecommitdiff
path: root/gamelocker/janus.py
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-01-15 19:35:30 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2017-01-15 19:35:39 +0100
commitbe0b8968651f98b962a18c4e750d6396c0fdaf47 (patch)
tree5d577ecb713068cc91feeb3f1c22ae134dbf236a /gamelocker/janus.py
parent517ac9c3f5b342327ddb248436fc7b47ce54b885 (diff)
downloadpython-gamelocker-be0b8968651f98b962a18c4e750d6396c0fdaf47.tar.gz
python-gamelocker-be0b8968651f98b962a18c4e750d6396c0fdaf47.zip
add functions to fancify items
Diffstat (limited to 'gamelocker/janus.py')
-rw-r--r--gamelocker/janus.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gamelocker/janus.py b/gamelocker/janus.py
index c4fd384..99c0a57 100644
--- a/gamelocker/janus.py
+++ b/gamelocker/janus.py
@@ -267,7 +267,7 @@ class Attribute(object): #Attribute Class to map Data from input Object to Messa
transformation to json.
"""
- __primitive_types = (str,str,int,int,float,bool) #all allowed types for attribute values. (lists and dicts are also allowed, but treated differently)
+ __primitive_types = (str,int,float,bool) #all allowed types for attribute values. (lists and dicts are also allowed, but treated differently)
value = None #holds the actual value of this attribute once it is set.
@@ -289,7 +289,7 @@ class Attribute(object): #Attribute Class to map Data from input Object to Messa
sets all needed configurations and checks if value is a primitive type or list or dict.
"""
- if value_type in self.__primitive_types or value_type == list or value_type == dict or issubclass(value_type,DataMessage):
+ if issubclass(value_type, self.__primitive_types + (list, dict)) or issubclass(value_type,DataMessage):
self.value_type = value_type
self.name = name
self.required = required