Changeset 5010
- Timestamp:
- 23/02/09 09:27:17 (12 years ago)
- Location:
- ndgCommon/trunk/ndg/common
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
ndgCommon/trunk/ndg/common/src/clients/xmldb/eXist/xmlrpcclient.py
r4976 r5010 219 219 ''' 220 220 logging.debug("Running remove operation on '%s'" %collectionPath) 221 r =self.xmlrpc.removeCollection(collectionPath)221 r = self.xmlrpc.removeCollection(collectionPath) 222 222 logging.debug("Remove operation completed on '%s'" %collectionPath) 223 223 return r … … 232 232 ''' 233 233 logging.debug("Running remove operation on '%s'" %docPath) 234 try: 235 r=self.xmlrpc.remove(docPath) 236 except xmlrpclib.Fault, f: 237 logging.error("Error encountered: '%s'" %f) 238 return False 234 r = self.xmlrpc.remove(docPath) 239 235 logging.debug("Remove operation completed on '%s'" %docPath) 240 236 return r -
ndgCommon/trunk/ndg/common/src/lib/utilities.py
r4991 r5010 23 23 esc_chars = {'\xb0':'°','°':'°'} 24 24 25 25 26 26 class edict(dict): 27 27 '''An extended dictionary which allows one to set and get values -
ndgCommon/trunk/ndg/common/src/models/ndgObject.py
r4989 r5010 112 112 return 113 113 114 115 114 self.server=self.config.get('DISCOVERY','default') 116 115 server=self.server -
ndgCommon/trunk/ndg/common/unittests/clients/xmldb/eXist/testxmlrpcclient.py
r4978 r5010 1 1 2 import unittest,os 2 import unittest,os, xmlrpclib 3 3 from ndg.common.src.clients.xmldb.eXist.xmlrpcclient import * 4 4 import ndg.common.src.clients.xmldb.eXist.dbconstants as dc … … 238 238 239 239 def testInvalidRemoveDoc(self): 240 self.assert False(self.client.removeDoc(tc.TEST_FILE_NAME))240 self.assertRaises(xmlrpclib.Fault, self.client.removeDoc, tc.TEST_FILE_NAME) 241 241 242 242
Note: See TracChangeset
for help on using the changeset viewer.