Ignore:
Timestamp:
Jan 11, 2017 5:52:59 AM (7 years ago)
Author:
wojciech
Children:
65d1d04
Parents:
4cb58ce
Message:

making conditional check for kernelcl module

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/gpu_options.py

    r755ecb0 r4320104  
    99 
    1010import os 
     11import sys 
    1112import warnings 
    1213import wx 
     
    2526 
    2627        self.text = wx.TextCtrl(self, -1, size=(500, 400), 
    27                            style=wx.TE_MULTILINE|wx.TE_READONLY 
    28                                  |wx.SUNKEN_BORDER) 
     28                           style=wx.TE_MULTILINE|wx.TE_READONLY) 
    2929        self.text.SetValue(msg) 
    3030        self.text.SetBackgroundColour(self.GetBackgroundColour()) 
     
    214214 
    215215        #Sasmodels kernelcl doesn't exist when initiated with None 
    216         try: 
     216        if 'sasmodels.kernelcl' in sys.modules: 
    217217            sasmodels.kernelcl.ENV = None 
    218         except: 
    219             #TODO: Need to provide reasonable exception case 
    220             pass 
    221  
    222         #Need to reload sasmodels.core module to account SAS_OPENCL = "None" 
     218 
    223219        reload(sasmodels.core) 
    224220        event.Skip() 
     
    253249 
    254250        #Sasmodels kernelcl doesn't exist when initiated with None 
    255         try: 
     251        if 'sasmodels.kernelcl' in sys.modules: 
    256252            sasmodels.kernelcl.ENV = None 
    257         except: 
    258             #TODO: Need to provide reasonable exception case 
    259             pass 
     253 
    260254 
    261255        #Need to reload sasmodels.core module to account SAS_OPENCL = "None" 
Note: See TracChangeset for help on using the changeset viewer.