Mercurial > hg > MetaDataProvider
changeset 23:5ed16f971297
getDomFromPathOrUrl does not throw exception but returns None.
author | casties |
---|---|
date | Wed, 25 Jul 2012 12:53:17 +0200 |
parents | 24214a828627 |
children | 64b703d1b8a4 |
files | MetaDataFolder.py version.txt |
diffstat | 2 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/MetaDataFolder.py Thu Apr 26 19:35:39 2012 +0200 +++ b/MetaDataFolder.py Wed Jul 25 12:53:17 2012 +0200 @@ -109,9 +109,14 @@ else: url = os.path.join(self.metaDataServerUrl%path,'index.meta') - #logging.debug("get Metadata: %s"%url) - md = getHttpData(url) - return md + try: + md = getHttpData(url) + return md + + except: + logging.error("getMDFromPathOrUrl: unable to get data!") + + return None def getDomFromPathOrUrl(self, path): """returns DOM of metadata file at given path"""