]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Consolidate Windows-specific imports in fileutil to avoid pyflakes warnings.
authorDaira Hopwood <daira@jacaranda.org>
Tue, 27 Oct 2015 12:02:57 +0000 (12:02 +0000)
committermeejah <meejah@meejah.ca>
Wed, 20 Jan 2016 08:32:07 +0000 (01:32 -0700)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/util/fileutil.py

index 74afd0084a6dc7647cdca5231107980d1e610865..4ea1263e6ebfc66335a79e49a875109e192b400c 100644 (file)
@@ -343,10 +343,6 @@ def to_windows_long_path(path):
 
 have_GetDiskFreeSpaceExW = False
 if sys.platform == "win32":
-    from ctypes import WINFUNCTYPE, windll, POINTER, byref, c_ulonglong, create_unicode_buffer, \
-        get_last_error
-    from ctypes.wintypes import BOOL, DWORD, LPCWSTR, LPWSTR
-
     # <http://msdn.microsoft.com/en-us/library/windows/desktop/ms683188%28v=vs.85%29.aspx>
     GetEnvironmentVariableW = WINFUNCTYPE(
         DWORD,
@@ -579,9 +575,6 @@ def reraise(wrapper):
     raise wrapper_exc.__class__, wrapper_exc, tb
 
 if sys.platform == "win32":
-    from ctypes import WINFUNCTYPE, windll, WinError, get_last_error
-    from ctypes.wintypes import BOOL, DWORD, LPCWSTR, LPVOID
-
     # <https://msdn.microsoft.com/en-us/library/windows/desktop/aa365512%28v=vs.85%29.aspx>
     ReplaceFileW = WINFUNCTYPE(
         BOOL,