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/specifications/%5B/%5D%20/quickstart.html?a=commitdiff_plain;h=2dea7450bbf8b021f939e4d480222b566b13028e;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