[MOBY-guts] biomoby commit

Yan Wong yanwong at pub.open-bio.org
Wed May 18 08:26:33 UTC 2005


yanwong
Wed May 18 04:26:33 EDT 2005
Update of /home/repository/moby/moby-live/Python/bioMoby
In directory pub.open-bio.org:/tmp/cvs-serv29889

Modified Files:
	mobyDataTypes.py 
Log Message:
added a test (without it, some objects (objects without a content attributes) wouldn't get marshalled) Thanks Mark Fiers ;)

moby-live/Python/bioMoby mobyDataTypes.py,1.21,1.22
===================================================================
RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyDataTypes.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- /home/repository/moby/moby-live/Python/bioMoby/mobyDataTypes.py	2005/05/16 12:42:01	1.21
+++ /home/repository/moby/moby-live/Python/bioMoby/mobyDataTypes.py	2005/05/18 08:26:32	1.22
@@ -149,7 +149,8 @@
 	#Put the raw content of the object
 	#If you want to put your special object, then then you should write 
 	#a __str__ method
-        result.append("%s"%(self.content))
+        if hasattr(self, "content"):
+            result.append("%s"%(self.content))
 	
 	result.append("</%s:%s>"%(self.__prefix__, self.__tag__))
 	
@@ -161,7 +162,7 @@
 	elem=xml
 	
 	if isinstance(xml, str):
-	    doc=parseString(xmlstring)
+	    doc=parseString(xml)
 	
 	    elem=doc.firstChild
 	




More information about the MOBY-guts mailing list