Show
Ignore:
Timestamp:
07/14/10 15:03:51 (3 years ago)
Author:
Snyder.Jason
Message:

fixes so can be used without wx

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • ossiedev/trunk/tools/wavedash/src/WavedashUtils.py

    r10108 r10139  
    203203        if self.obj is None: 
    204204            print "init_CORBA(): FATAL Error: Could not resolve initial references" 
    205              
    206205            showMessage('Could not resolve initial references' , FATAL, self.enableGUI) 
    207206            return 
     
    211210            #print "init_CORBA(): FATAL Error: Failed to get naming context" 
    212211            #showMessage('Could not initialize CORBA. Failed to get naming context \n The application will now exit.', FATAL) 
     212             
    213213            newNS = False 
    214214            while not newNS: 
    215215                ts = "Failed to narrow the root naming context.\n" 
    216216                ts += "Are the Naming Service and nodeBooter running on "+self.__namingservice+"?" 
     217                
    217218                showMessage(ts, NON_FATAL, self.enableGUI) 
    218219                nsDialog = NamingserviceDialog(self) 
     
    220221                    newNS = True 
    221222                elif nsDialog.GetReturnCode() == -2: 
    222                     sys.exit(-1) 
     223                        sys.exit(-1) 
     224                 
    223225            return 
    224226         
     
    266268        except(CORBA.TRANSIENT), val: 
    267269            #print "In getApplications():",  str(val) 
    268             showMessage("Exception! " + str(val) + "\n Could not get applications from Domain Manager \n Exiting now!!!" , FATAL)  
     270            showMessage("Exception! " + str(val) + "\n Could not get applications from Domain Manager \n Exiting now!!!" , FATAL, self.enableGUI)  
    269271            sys.exit(-1) 
    270272        members = dom_context.list(100) 
     
    303305            devMgrSeq = self.domMgr._get_deviceManagers() 
    304306        except(CORBA.COMM_FAILURE, CORBA.TRANSIENT), val: 
    305             showMessage("Exception: " + str(val) + "\n - Could not get device managers!" , NON_FATAL) 
     307            showMessage("Exception: " + str(val) + "\n - Could not get device managers!" , NON_FATAL, self.enableGUI) 
    306308            return  
    307309             
     
    330332            if len(assigndeviceidNodeList) == 0: 
    331333                ts = "Could not find \"assigndeviceid\" tag\nAborting install" 
    332                 showMessage(ts, NON_FATAL) 
     334                showMessage(ts, NON_FATAL, self.enableGUI) 
    333335                #errorMsg(self, ts) 
    334336                return 
     
    341343                ts = "Could not find the required device: " + str(assigndeviceid) 
    342344                ts += "\nAborting install" 
    343                 showMessage(ts, NON_FATAL) 
     345                showMessage(ts, NON_FATAL, self.enableGUI) 
    344346                #errorMsg(self, ts) 
    345347                return 
     
    357359     
    358360        if app_factory_num == -1: 
    359             showMessage ("Application factory not found", NON_FATAL) 
     361            showMessage ("Application factory not found", NON_FATAL, self.enableGUI) 
    360362             
    361363 
     
    365367            app = _applicationFactories[app_factory_num].create(_applicationFactories[app_factory_num]._get_name(),_appFacProps,_devSeq) 
    366368        except: 
    367             showMessage("Unable to create application\nMake sure that all appropriate nodes are installed", NON_FATAL) 
     369            showMessage("Unable to create application\nMake sure that all appropriate nodes are installed", NON_FATAL, self.enableGUI) 
    368370            return(None) 
    369371         
     
    382384            appRef = self.getAppRef(wformName) 
    383385            if appRef is None: 
    384                 showMessage("Error: Failed to get application reference for " + wformName, NON_FATAL) 
     386                showMessage("Error: Failed to get application reference for " + wformName, NON_FATAL, self.enableGUI) 
    385387                return False 
    386388            appRef.releaseObject() 
    387389        except(CORBA.COMM_FAILURE, CORBA.INV_OBJREF), val: 
    388             showMessage("Exception: " + str(val) + "\n - Could not uninstall " + wformName, NON_FATAL) 
     390            showMessage("Exception: " + str(val) + "\n - Could not uninstall " + wformName, NON_FATAL, self.enableGUI) 
    389391            return False 
    390392        return True 
     
    420422        try: 
    421423            if dom_context is None: 
    422                 showMessage('Could not reference for DomainName1', NON_FATAL) 
     424                showMessage('Could not reference for DomainName1', NON_FATAL, self.enableGUI) 
    423425                return 
    424426            appSeq = self.domMgr._get_applications() 
     
    461463            prpRsrcRef = self.rootContext.resolve(prp) 
    462464            if prpRsrcRef is None: 
    463                 showMessage(("Unable to find rootContext for %s/%s" % (wformName,compName)), NON_FATAL) 
     465                showMessage(("Unable to find rootContext for %s/%s" % (wformName,compName)), NON_FATAL, self.enableGUI) 
    464466                return None 
    465467         
     
    468470         
    469471            if prpSetHandle is None: 
    470                 showMessage(("Unable to get PropertySet reference for %s/%s" % (wformName, compName)), NON_FATAL) 
     472                showMessage(("Unable to get PropertySet reference for %s/%s" % (wformName, compName)), NON_FATAL, self.enableGUI) 
    471473     
    472474            if len(prpList) == 0: 
     
    475477        except: 
    476478            errorMsg = sys.exc_info()[1] 
    477             showMessage(str(errorMsg), NON_FATAL) 
     479            showMessage(str(errorMsg), NON_FATAL, self.enableGUI) 
    478480            return None 
    479481         
     
    489491            prpRsrcRef = self.rootContext.resolve(prpRef) 
    490492            if prpRsrcRef is None: 
    491                 showMessage(("Unable to find rootContext for %s/%s" % (wformName,compName)), NON_FATAL) 
     493                showMessage(("Unable to find rootContext for %s/%s" % (wformName,compName)), NON_FATAL, self.enableGUI) 
    492494                return False 
    493495         
     
    495497            prpSetHandle = prpRsrcRef._narrow(CF.PropertySet) 
    496498            if prpSetHandle is None: 
    497                 showMessage(("Unable to get PropertySet reference for %s/%s" % (wformName, compName)), NON_FATAL) 
     499                showMessage(("Unable to get PropertySet reference for %s/%s" % (wformName, compName)), NON_FATAL, self.enableGUI) 
    498500                return False 
    499501            prpSetHandle.configure(prpList) 
     
    502504        except: 
    503505            errorMsg = str(sys.exc_info()[1]) 
    504             showMessage("Exception! " + errorMsg + "\n Connection to Domain Manager Failed", NON_FATAL) 
     506            showMessage("Exception! " + errorMsg + "\n Connection to Domain Manager Failed", NON_FATAL, self.enableGUI) 
    505507            return False 
    506508