Changeset 541d9229dc67…
Parent bd3b973c5dce…
by
Changes to one file · Browse files at 541d9229dc67 Showing diff from parent bd3b973c5dce Diff from another changeset...
@@ -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,
|
Loading...