Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

gtklib: catch explicit exception type from save dialog

Changeset cc43edb0eb48

Parent f22932d39581

by Steve Borho

Changes to one file · Browse files at cc43edb0eb48 Showing diff from parent f22932d39581 Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​gtklib.py Stacked
 
186
187
188
189
 
190
191
192
193
194
195
 
196
197
198
 
205
206
207
208
 
209
210
211
 
186
187
188
 
189
190
191
192
193
194
 
195
196
197
198
 
205
206
207
 
208
209
210
211
@@ -186,13 +186,13 @@
  """run the file dialog, either return a file name, or False if   the user aborted the dialog"""   try: - import win32gui, win32con + import win32gui, win32con, pywintypes   return self.runWindows()   except ImportError:   return self.runCompatible()     def runWindows(self): - import win32gui, win32con + import win32gui, win32con, pywintypes   try:   fname, customfilter, flags=win32gui.GetSaveFileNameW(   InitialDir=self.InitialDir, @@ -205,7 +205,7 @@
  FilterIndex=1)   if fname:   return fname - except: + except pywintypes.error:   pass   return False