From: Daira Hopwood Date: Mon, 28 Dec 2015 20:27:35 +0000 (+0000) Subject: Improved error handling and cosmetics for ctypes calls on Windows. X-Git-Url: https://git.rkrishnan.org/(%5B%5E?a=commitdiff_plain;h=66e9b7827968f2edfc7e4a6e02bfb8abbdfeeafb;p=tahoe-lafs%2Ftahoe-lafs.git Improved error handling and cosmetics for ctypes calls on Windows. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/util/fileutil.py b/src/allmydata/util/fileutil.py index 0366daab..185e3fa4 100644 --- a/src/allmydata/util/fileutil.py +++ b/src/allmydata/util/fileutil.py @@ -11,6 +11,11 @@ if sys.platform == "win32": create_unicode_buffer, get_last_error from ctypes.wintypes import BOOL, DWORD, LPCWSTR, LPWSTR, LPVOID, HANDLE +if sys.platform == "win32": + from ctypes import WINFUNCTYPE, WinError, windll, POINTER, byref, c_ulonglong, \ + create_unicode_buffer, get_last_error + from ctypes.wintypes import BOOL, DWORD, LPCWSTR, LPWSTR + from twisted.python import log from pycryptopp.cipher.aes import AES