diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-01-15 19:35:30 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-01-15 19:35:39 +0100 |
| commit | be0b8968651f98b962a18c4e750d6396c0fdaf47 (patch) | |
| tree | 5d577ecb713068cc91feeb3f1c22ae134dbf236a /gamelocker/janus.py | |
| parent | 517ac9c3f5b342327ddb248436fc7b47ce54b885 (diff) | |
| download | python-gamelocker-be0b8968651f98b962a18c4e750d6396c0fdaf47.tar.gz python-gamelocker-be0b8968651f98b962a18c4e750d6396c0fdaf47.zip | |
add functions to fancify items
Diffstat (limited to 'gamelocker/janus.py')
| -rw-r--r-- | gamelocker/janus.py | 4 |
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 |
