@@ -313,24 +313,25 @@ def shouldRollover(self, record):
313313 return 0
314314
315315
316- class SHELLEXECUTEINFO (ctypes .Structure ):
317- _fields_ = [
318- ("cbSize" , ctypes .c_ulong ),
319- ("fMask" , ctypes .c_ulong ),
320- ("hwnd" , ctypes .c_void_p ),
321- ("lpVerb" , ctypes .c_wchar_p ),
322- ("lpFile" , ctypes .c_wchar_p ),
323- ("lpParameters" , ctypes .c_wchar_p ),
324- ("lpDirectory" , ctypes .c_wchar_p ),
325- ("nShow" , ctypes .c_int ),
326- ("hInstApp" , ctypes .c_void_p ),
327- ("lpIDList" , ctypes .c_void_p ),
328- ("lpClass" , ctypes .c_wchar_p ),
329- ("hkeyClass" , ctypes .c_void_p ),
330- ("dwHotKey" , ctypes .c_ulong ),
331- ("hIcon" , ctypes .c_void_p ),
332- ("hProcess" , ctypes .c_void_p ),
333- ]
316+ if sys .platform == 'win32' :
317+ class SHELLEXECUTEINFO (ctypes .Structure ):
318+ _fields_ = [
319+ ("cbSize" , ctypes .c_ulong ),
320+ ("fMask" , ctypes .c_ulong ),
321+ ("hwnd" , ctypes .c_void_p ),
322+ ("lpVerb" , ctypes .c_wchar_p ),
323+ ("lpFile" , ctypes .c_wchar_p ),
324+ ("lpParameters" , ctypes .c_wchar_p ),
325+ ("lpDirectory" , ctypes .c_wchar_p ),
326+ ("nShow" , ctypes .c_int ),
327+ ("hInstApp" , ctypes .c_void_p ),
328+ ("lpIDList" , ctypes .c_void_p ),
329+ ("lpClass" , ctypes .c_wchar_p ),
330+ ("hkeyClass" , ctypes .c_void_p ),
331+ ("dwHotKey" , ctypes .c_ulong ),
332+ ("hIcon" , ctypes .c_void_p ),
333+ ("hProcess" , ctypes .c_void_p ),
334+ ]
334335
335336
336337def run_elevated (exe_path , cwd , * args ):
0 commit comments