Ignore:
Timestamp:
01/08/12 11:17:27 (8 years ago)
Author:
mnagni
Message:

Fixed a bug in objectEncoding

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/MolesManager/views/moles2gui/__init__.py

    r8477 r8480  
    99import operator 
    1010import inspect 
     11from libs.epb import isPrimitive 
    1112 
    1213""" 
     
    305306        return ret 
    306307    else: 
    307         return _encodeCedaMoles2Adapter(newobj)             
    308      
    309 def _isPrimitive(obj): 
    310     # Is a simple primitive? 
    311     return obj is None \ 
    312             or isinstance(obj, str) \ 
    313             or isinstance(obj, int) \ 
    314             or isinstance(obj, unicode) 
    315      
     308        return _encodeCedaMoles2Adapter(newobj)               
    316309     
    317310def _encodeCedaMoles2Adapter(cedaObj): 
    318     if _isPrimitive(cedaObj): 
     311    if isPrimitive(cedaObj): 
    319312        return cedaObj 
    320313     
     
    332325    decJson = json 
    333326     
    334     if _isPrimitive(decJson) and not isinstance(decJson, str): 
     327    if isPrimitive(decJson) and not isinstance(decJson, str): 
    335328        return decJson  
    336329     
Note: See TracChangeset for help on using the changeset viewer.