Changeset 4512 for exist


Ignore:
Timestamp:
28/11/08 12:21:52 (11 years ago)
Author:
cbyrom
Message:

Fix problem with retaining empty category data + improve output error logging + improve robustness of exist file retrieval.

Location:
exist/trunk/python/ndgUtils
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • exist/trunk/python/ndgUtils/lib/atomvalidator.py

    r4506 r4512  
    247247        logging.info("Validating atom vocab data") 
    248248        for category in self._atom.parameters: 
    249             self.__validateTermURL(category.scheme) 
     249            if category.hasValue(): 
     250                self.__validateTermURL(category.scheme) 
    250251 
    251252        # also check the terms used in the links 
  • exist/trunk/python/ndgUtils/models/Atom.py

    r4502 r4512  
    515515            category = Category() 
    516516            # NB, data already tidied up here, so set keyword to avoid this happening again 
    517             category.fromString(param, escapeSpecialCharacters=False) 
     517            category.fromString(param, escapeSpecialCharacters=True) 
    518518 
    519519            # now check for uniqueness 
  • exist/trunk/python/ndgUtils/models/existdbclient.py

    r4499 r4512  
    2222     
    2323    def __init__(self, configFile = None, eXistDBHostname = None, \ 
    24                  loadCollectionData=False, setUpDB=False): 
     24                 loadCollectionData=False, setUpDB = False): 
    2525        ''' 
    2626        Initialise a connection to the eXistDB 
     
    144144                if repeat: 
    145145                    errorMessage += " (%s times)" %repeat 
    146                 errors.append(errorMessage) 
     146                # only return basic error message to users - the log file will contain the full error 
     147                errors.append(error.text)#errorMessage) 
    147148                logging.info(errorMessage) 
    148149        else: 
     
    232233        id = self.__lookupEXistFile(docPath) 
    233234         
    234         if not id: 
     235        if not id and id != 0: 
    235236            logging.info("No file found - nothing to retrieve") 
    236237            return None 
Note: See TracChangeset for help on using the changeset viewer.