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

shlib: catch exceptions in SHILCreateFromPath()

Fixes #209

Changeset 541d9229dc67

Parent bd3b973c5dce

by Steve Borho

Changes to one file · Browse files at 541d9229dc67 Showing diff from parent bd3b973c5dce Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​shlib.py Stacked
 
172
173
174
 
175
176
177
 
184
185
186
187
 
 
 
 
188
189
190
 
172
173
174
175
176
177
178
 
185
186
187
 
188
189
190
191
192
193
194
@@ -172,6 +172,7 @@
  def shell_notify(paths):   try:   from win32com.shell import shell, shellcon + import pywintypes   except ImportError:   return   dirs = [] @@ -184,7 +185,10 @@
  # send notifications to deepest directories first   dirs.sort(lambda x, y: len(y) - len(x))   for dir in dirs: - pidl, ignore = shell.SHILCreateFromPath(dir, 0) + try: + pidl, ignore = shell.SHILCreateFromPath(dir, 0) + except pywintypes.com_error: + return   if pidl is None:   continue   shell.SHChangeNotify(shellcon.SHCNE_UPDATEITEM,