Mercurial > hg > MetaDataProvider
comparison MetaDataFolder.py @ 10:68bc459c9f59
getmd handles empty url
author | casties |
---|---|
date | Fri, 29 Jul 2011 12:09:33 +0200 |
parents | eeaad777d3d7 |
children | a29665fa9c62 |
comparison
equal
deleted
inserted
replaced
9:eeaad777d3d7 | 10:68bc459c9f59 |
---|---|
83 self.title = title | 83 self.title = title |
84 self.metaDataServerUrl = metaDataServerUrl | 84 self.metaDataServerUrl = metaDataServerUrl |
85 | 85 |
86 | 86 |
87 def getMDFromPathOrUrl(self,path): | 87 def getMDFromPathOrUrl(self,path): |
88 """returns contents of metadata file from server as text""" | |
89 if not path: | |
90 logging.error("getMDFromPathOrUrl: empty path!") | |
91 return "" | |
92 | |
88 parsedurl = urlparse.urlparse(path) | 93 parsedurl = urlparse.urlparse(path) |
89 if parsedurl[0] != "": | 94 if parsedurl[0] != "": |
90 # has schema (e.g. http) | 95 # has schema (e.g. http) |
91 url=path | 96 url=path |
92 else: | 97 else: |