Ignore:
Timestamp:
27/11/08 09:57:49 (12 years ago)
Author:
cbyrom
Message:

Improve error logging when testing for valid unicode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • exist/trunk/python/ndgUtils/models/existdbclient.py

    r4493 r4499  
    215215        logging.info("Retrieving info for file, '%s'" %docPath) 
    216216         
    217         doc = self.xmldb.executeQuery('doc("' + docPath + '")') 
    218          
    219         if doc[1]['hits'] == 0: 
     217        id, doc = self.xmldb.executeQuery('doc("' + docPath + '")') 
     218         
     219        if doc['hits'] == 0: 
    220220            logging.info("File does not exist in eXist DB") 
    221221            return None 
    222222        logging.info("Found file - returning result ID") 
    223         return doc[0] 
     223        return id 
    224224          
    225225 
Note: See TracChangeset for help on using the changeset viewer.