The branch, eden has been updated
via 6394972787377f0c592fbd56741ab99a3291d318 (commit)
from 074104ed5c01e3c382d534ce03225e98fc381db5 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=6394972787377f0c592fbd56741ab99a3291d318
commit 6394972787377f0c592fbd56741ab99a3291d318
Author: amet <[email protected]>
Date: Sun May 13 00:10:26 2012 +0400
[service.watchdog] -v0.6.0 - take 2
diff --git a/service.watchdog/watchdog/observers/winapi_common.py
b/service.watchdog/watchdog/observers/winapi_common.py
index 900fa59..1d4beb6 100644
--- a/service.watchdog/watchdog/observers/winapi_common.py
+++ b/service.watchdog/watchdog/observers/winapi_common.py
@@ -106,7 +106,10 @@ if platform.is_windows():
def close_directory_handle(handle):
- CancelIoEx(handle, None) #force ReadDirectoryChangesW to return
+ try:
+ CancelIoEx(handle, None) #force ReadDirectoryChangesW to return
+ except WindowsError:
+ return
def read_directory_changes(handle, event_buffer, recursive):
@@ -115,14 +118,17 @@ if platform.is_windows():
http://timgolden.me.uk/pywin32-docs/win32file__ReadDirectoryChangesW_meth.html
"""
nbytes = ctypes.wintypes.DWORD()
- ReadDirectoryChangesW(handle,
- ctypes.byref(event_buffer),
- len(event_buffer),
- recursive,
- WATCHDOG_FILE_NOTIFY_FLAGS,
- ctypes.byref(nbytes),
- None,
- None)
+ try:
+ ReadDirectoryChangesW(handle,
+ ctypes.byref(event_buffer),
+ len(event_buffer),
+ recursive,
+ WATCHDOG_FILE_NOTIFY_FLAGS,
+ ctypes.byref(nbytes),
+ None,
+ None)
+ except WindowsError:
+ return [], 0
# get_FILE_NOTIFY_INFORMATION expects nBytes to be long.
return event_buffer.raw, long(nbytes.value)
-----------------------------------------------------------------------
Summary of changes:
.../watchdog/observers/winapi_common.py | 24 ++++++++++++-------
1 files changed, 15 insertions(+), 9 deletions(-)
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons