changeset 10:68bc459c9f59

getmd handles empty url
author casties
date Fri, 29 Jul 2011 12:09:33 +0200
parents eeaad777d3d7
children a29665fa9c62
files MetaDataFolder.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MetaDataFolder.py	Thu Jul 28 18:08:58 2011 +0200
+++ b/MetaDataFolder.py	Fri Jul 29 12:09:33 2011 +0200
@@ -85,6 +85,11 @@
 
         
     def getMDFromPathOrUrl(self,path):
+        """returns contents of metadata file from server as text"""
+        if not path:
+            logging.error("getMDFromPathOrUrl: empty path!")
+            return ""
+        
         parsedurl = urlparse.urlparse(path)
         if parsedurl[0] != "":
             # has schema (e.g. http)