Add a help message if user system is missing PyWin32 when running emrun on Windows.
This commit is contained in:
Родитель
e5025fe17a
Коммит
386e0f810d
17
emrun
17
emrun
|
@ -51,13 +51,16 @@ LINUX = False
|
|||
OSX = False
|
||||
if os.name == 'nt':
|
||||
WINDOWS = True
|
||||
|
||||
import win32api, _winreg
|
||||
from win32com.client import GetObject
|
||||
from win32api import GetFileVersionInfo, LOWORD, HIWORD
|
||||
import shlex
|
||||
from _winreg import HKEY_CURRENT_USER, OpenKey, QueryValue
|
||||
|
||||
try:
|
||||
import shlex
|
||||
import win32api, _winreg
|
||||
from win32com.client import GetObject
|
||||
from win32api import GetFileVersionInfo, LOWORD, HIWORD
|
||||
from _winreg import HKEY_CURRENT_USER, OpenKey, QueryValue
|
||||
except Exception, e:
|
||||
print >> sys.stderr, str(e)
|
||||
print >> sys.stderr, "Importing Python win32 modules failed! This most likely occurs if you do not have PyWin32 installed! Get it from http://sourceforge.net/projects/pywin32/"
|
||||
sys.exit(1)
|
||||
elif platform.system() == 'Linux':
|
||||
LINUX = True
|
||||
elif platform.mac_ver()[0] != '':
|
||||
|
|
Загрузка…
Ссылка в новой задаче