Ignore:
Timestamp:
12/04/12 11:33:53 (8 years ago)
Author:
mnagni
Message:

Incomplete - # 22385: CEDA Observation - result
 http://team.ceda.ac.uk/trac/ceda/ticket/22385

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/MolesManager/djencoder.py

    r8200 r8221  
    77from MolesManager.forms.date import methodsWithDecorator 
    88import re 
     9import logging 
    910 
    1011class DJEncoder(JSONEncoder): 
    1112 
     13    log = logging.getLogger('DJEncoder') 
    1214     
    1315    def __init__(self): 
     
    3941        getters = list(methodsWithDecorator(type(obj), "property")) 
    4042        for name in getters: 
    41             d.update({name: getattr(obj, name)}) 
     43            try: 
     44                d.update({name: getattr(obj, name)}) 
     45            except Exception as e: 
     46                DJEncoder.log.error(e) 
    4247         
    4348        for key, value in d.items(): 
Note: See TracChangeset for help on using the changeset viewer.