From 2dea7450bbf8b021f939e4d480222b566b13028e Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Mon, 28 Dec 2015 20:27:35 +0000 Subject: [PATCH] Improved error handling and cosmetics for ctypes calls on Windows. Signed-off-by: Daira Hopwood --- src/allmydata/util/fileutil.py | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.45.2