Changeset 1701
- Timestamp:
- Mar 13, 2015 6:41:45 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrls.py
r1696 r1701 2094 2094 self.dataLoc.SetLabel(tutorialPath) 2095 2095 self.EndModal(wx.ID_OK) 2096 wx.BeginBusyCursor() 2096 2097 if self.BrowseMode == 0: 2097 2098 # xfer data & web page locally, then open web page … … 2114 2115 ShowWebPage(URL,self.frame) 2115 2116 else: 2117 wx.EndBusyCursor() 2116 2118 raise Exception("How did this happen!") 2119 wx.EndBusyCursor() 2117 2120 def ValidateTutorialDir(self,fullpath=tutorialPath,baseURL=G2BaseURL): 2118 2121 '''Load help to new directory or make sure existing directory looks correctly set up … … 2122 2125 if os.path.exists(os.path.join(fullpath,"help")): 2123 2126 if not GSASIIpath.svnGetRev(os.path.join(fullpath,"help")): 2124 raise Exception("Problem with "+fullpath+" dir help exists but is not in SVN") 2125 else: 2126 raise Exception("Problem: dir "+fullpath+" exists does not contain help") 2127 print("Problem with "+fullpath+" dir help exists but is not in SVN") 2128 raise Exception 2127 2129 if os.path.exists(os.path.join(fullpath,"Exercises")): 2128 2130 if not GSASIIpath.svnGetRev(os.path.join(fullpath,"Exercises")): 2129 raise Exception("Problem with "+fullpath+" dir Exercises exists but is not in SVN") 2130 else: 2131 raise Exception("Problem: dir "+fullpath+" exists does not contain Exercises") 2132 else: 2133 if not GSASIIpath.svnInstallDir(baseURL+"/MT",fullpath): 2134 raise Exception("Problem transferring empty directory from web") 2131 print("Problem with "+fullpath+" dir Exercises exists but is not in SVN") 2132 raise Exception 2133 if (os.path.exists(os.path.join(fullpath,"help")) and 2134 os.path.exists(os.path.join(fullpath,"Exercises"))): 2135 return True # both good 2136 elif (os.path.exists(os.path.join(fullpath,"help")) or 2137 os.path.exists(os.path.join(fullpath,"Exercises"))): 2138 print("Problem: dir "+fullpath+" exists has either help or Exercises, not both") 2139 raise Exception 2140 wx.BeginBusyCursor() 2141 if not GSASIIpath.svnInstallDir(baseURL+"/MT",fullpath): 2142 wx.EndBusyCursor() 2143 print("Problem transferring empty directory from web") 2144 raise Exception 2145 wx.EndBusyCursor() 2135 2146 return True 2136 2147 … … 2139 2150 if GSASIIpath.svnSwitchDir("help",tutorialname,baseURL+"/Tutorials",fullpath): 2140 2151 return True 2141 raise Exception("Problem transferring Tutorial from web") 2152 print("Problem transferring Tutorial from web") 2153 raise Exception 2142 2154 2143 2155 def LoadExercise(self,tutorialname,fullpath=tutorialPath,baseURL=G2BaseURL): … … 2145 2157 if GSASIIpath.svnSwitchDir("Exercises",tutorialname,baseURL+"/Exercises",fullpath): 2146 2158 return True 2147 raise Exception("Problem transferring Exercise from web") 2159 print ("Problem transferring Exercise from web") 2160 raise Exception 2148 2161 2149 2162 def SelectDownloadLoc(self,event): … … 2167 2180 os.makedirs(pth) 2168 2181 except OSError: 2169 G2MessageBox(self.frame, 2170 '''The selected directory is not valid. 2171 2172 It appears you do not have write access to this location. 2173 ''') 2182 msg = 'The selected directory is not valid.\n\t' 2183 msg += pth 2184 msg += '\n\nAn attempt to create the directory failed' 2185 G2MessageBox(self.frame,msg) 2174 2186 return 2187 self.ValidateTutorialDir(pth,G2BaseURL) 2175 2188 try: 2176 2189 self.ValidateTutorialDir(pth,G2BaseURL) -
trunk/GSASIIddataGUI.py
r1700 r1701 858 858 def OnSelSpin(event): 859 859 hist = keyList[selSpin.GetValue()] 860 selSpin.Destroy() # remove button to discourage pressing too fast 860 861 G2plt.PlotSizeStrainPO(G2frame,data) 861 862 wx.CallLater(100,UpdateDData,G2frame,DData,data,hist) … … 870 871 selSpin.SetValue(keyList.index(hist)) 871 872 selSpin.SetRange(0,len(keyList)-1) 872 selSpin.Bind(wx.EVT_SPIN,OnSelSpin)873 873 selSizer.Add(selSpin) 874 874 select = wx.ListBox(DData,choices=keyList,style=wx.LB_SINGLE,size=(-1,100)) … … 997 997 mainSizer.Add((5,5),0) 998 998 G2phsGUI.SetPhaseWindow(G2frame.dataFrame,DData,mainSizer) 999 selSpin.Bind(wx.EVT_SPIN,OnSelSpin) -
trunk/GSASIIpath.py
r1696 r1701 400 400 svn = whichsvn() 401 401 if not svn: return 402 if os.path.exists(loadpath):403 raise Exception("Error: Attempting to create existing directory "+loadpath)404 402 cmd = [svn,'co',URL,loadpath,'--non-interactive'] 405 403 if svnVersionNumber() >= 1.6: cmd += ['--trust-server-cert']
Note: See TracChangeset
for help on using the changeset viewer.