Only import win32api on Windows.

This commit is contained in:
David Vierra 2015-06-11 09:03:02 -10:00
parent a00a17a224
commit 474b0f499f

View File

@ -1,10 +1,10 @@
import os
import sys
import win32api
def getUserFilesDirectory():
if sys.platform == "win32":
import win32api
# On Windows, sys.executable is codepage-encoded.
# It cannot represent all possible filenames, so get the exe filename
# using this wide-character API, which returns a `unicode`