]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Improved error handling and cosmetics for ctypes calls on Windows.
authorDaira Hopwood <daira@jacaranda.org>
Mon, 28 Dec 2015 20:27:35 +0000 (20:27 +0000)
committermeejah <meejah@meejah.ca>
Wed, 20 Jan 2016 08:33:20 +0000 (01:33 -0700)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/util/fileutil.py

index 0366daabf694ec9831eddfb7ae8c25dda0aed8d5..185e3fa44aeafea7503ac86b0d33c71cb747a2fd 100644 (file)
@@ -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