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/forms/date.py

    r8476 r8480  
    2323    pass 
    2424     
    25 def methodsWithDecorator(cls, decoratorName): 
    26     if type(cls).__name__ == 'type' or type(cls).__name__ == 'instancemetho': 
    27         return  
    28     sourcelines = inspect.getsourcelines(cls)[0] 
    29     for i,line in enumerate(sourcelines): 
    30         line = line.strip() 
    31         if line.split('(')[0].strip() == '@'+decoratorName: # leaving a bit out 
    32             nextLine = sourcelines[i+1] 
    33             name = nextLine.split('def')[1].split('(')[0].strip() 
    34             yield(name) 
    35  
    36  
    3725class Model2Form(object): 
    3826    def __init__(self, obj = None, mapper = None): 
Note: See TracChangeset for help on using the changeset viewer.