configurationengine/source/plugins/common/ConeContentPlugin/contentplugin/contentmlparser.py
changeset 3 e7e0ae78773e
parent 0 2e8eeb919028
child 5 d2c80f5cab53
--- a/configurationengine/source/plugins/common/ConeContentPlugin/contentplugin/contentmlparser.py	Fri Mar 12 08:30:17 2010 +0200
+++ b/configurationengine/source/plugins/common/ConeContentPlugin/contentplugin/contentmlparser.py	Tue Aug 10 14:29:28 2010 +0300
@@ -60,8 +60,10 @@
         self.configuration = configuration
 
     def path_convert(self, path):
-        (drive, tail) = os.path.splitdrive(path)
-        return tail.lstrip('\\/')
+        match = re.match('([a-zA-Z]:)(.*)', path)
+        if match:
+            path = match.group(2)
+        return path.lstrip('\\/')
 
     def get_dir(self):
         if self.configuration and ConfmlRefs.is_confml_ref(self._dir):
@@ -151,7 +153,9 @@
                             # change None value to empty string
                             cvalue = dview.get_feature(cref).value or ''
                             if utils.is_list(cvalue):
-                                cvalue = ", ".join(cvalue)
+                                # Allow only strings (mainly filter out Nones)
+                                cvalue = filter(lambda x: isinstance(x, basestring), cvalue)
+                                cvalue = ", ".join([v or '' for v in cvalue])
                             key_list[index] = cvalue
                         except exceptions.NotFound:
                             logging.getLogger('cone.content').error("Feature ref '%s' in include key '%s' not found." % (cref,key))
@@ -448,5 +452,5 @@
                 if not ref in ret:
                     ret.append(matchref.group(1))
             else:
-				ret.append(p)
+                ret.append(p)
         return ret
\ No newline at end of file