[Zapp-cvs-commit] ZApp ZApp_Base.py,1.23,1.24
Brought to you by:
sspickle
|
From: Stephen S. <ce...@us...> - 2004-04-01 14:25:53
|
Update of /cvsroot/zapp/ZApp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23813 Modified Files: ZApp_Base.py Log Message: make findApplication more robust.. Index: ZApp_Base.py =================================================================== RCS file: /cvsroot/zapp/ZApp/ZApp_Base.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** ZApp_Base.py 30 Mar 2004 17:06:26 -0000 1.23 --- ZApp_Base.py 1 Apr 2004 14:13:54 -0000 1.24 *************** *** 260,271 **** while 1: if (not currObject) or (not hasattr(currObject, 'meta_type')): raise RuntimeError, "Hmm. thaf's odd.. I can't find any ZApp Application here!" ! if currObject.meta_type == self.applicationMetaType: break ! if hasattr(currObject, 'objectIds') and currObject.objectIds( ZApp_Application.ZApp_Application.meta_type ): ! apps = currObject.objectValues( ZApp_Application.ZApp_Application.meta_type ) result = apps and apps[0] if result: --- 260,272 ---- while 1: + mtype = getattr(currObject,'applicationMetaType','') if (not currObject) or (not hasattr(currObject, 'meta_type')): raise RuntimeError, "Hmm. thaf's odd.. I can't find any ZApp Application here!" ! if currObject.meta_type == mtype: break ! if hasattr(currObject, 'objectIds') and currObject.objectIds( mtype ): ! apps = currObject.objectValues( mtype ) result = apps and apps[0] if result: |