Ignore:
Timestamp:
15/12/08 09:22:56 (11 years ago)
Author:
cbyrom
Message:

Improve error handling in the atom controllers + refactor ndgInterface
to remove code from constructor to allow dependency injection - to
improve flexibility and testability. Also, change ambiguous naming
references in classes to minimise codeword overaps/confusion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MILK/trunk/milk_server/milk_server/controllers/browse/retrieve.py

    r4535 r4625  
    55from ndgUtils.models import stubB, DIF 
    66from milk_server.lib import mailer 
    7 from milk_server.lib.ndgInterface import interface  
     7from milk_server.lib.ndgInterface import ndgInterface  
    88from ndgUtils.models.DIF import DIF 
    99from xml.parsers.expat import ExpatError 
     
    5353            return render('error') 
    5454         
     55        interface = ndgInterface() 
    5556        status,x=interface.GetXML(uri,outputSchema=self.outputSchema) 
    5657        if status: 
     
    8687                c.atom = atom 
    8788            else: 
     89                interface = ndgInterface() 
    8890                status,x=interface.GetXML(uri,outputSchema=self.outputSchema, useCache=False) 
    8991                c.xmlh=x 
     
    152154            useCache = False 
    153155             
     156        interface = ndgInterface() 
    154157        status,x=interface.GetXML(uri,outputSchema=self.outputSchema, useCache=useCache) 
    155158        c.title='Viewing [%s]'%self.uri 
Note: See TracChangeset for help on using the changeset viewer.