[MOBY-guts] biomoby commit

Yan Wong yanwong at pub.open-bio.org
Tue Feb 1 14:20:44 UTC 2005


yanwong
Tue Feb  1 09:20:44 EST 2005
Update of /home/repository/moby/moby-live/Python/bioMoby
In directory pub.open-bio.org:/tmp/cvs-serv14364/bioMoby

Modified Files:
	mobyDataTypes.py 
Log Message:


moby-live/Python/bioMoby mobyDataTypes.py,1.8,1.9
===================================================================
RCS file: /home/repository/moby/moby-live/Python/bioMoby/mobyDataTypes.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- /home/repository/moby/moby-live/Python/bioMoby/mobyDataTypes.py	2005/02/01 11:31:22	1.8
+++ /home/repository/moby/moby-live/Python/bioMoby/mobyDataTypes.py	2005/02/01 14:20:44	1.9
@@ -209,10 +209,10 @@
                     #if there is already an object, then store it inside a list and 
                     #append the other objects in the list 
                     if hasattr(self, associatedObjectName):
-                        if type(getattr(self, associatedObjectName)) is list:
+                        if isinstance(getattr(self, associatedObjectName), list):
                             getattr(self, associatedObjectName).append(o)
                         else:
-                            setattr(self, associatedObjectName, [o])
+                            setattr(self, associatedObjectName, o)
                     else:
                         setattr(self, associatedObjectName, o)
             else:




More information about the MOBY-guts mailing list