VirtualBox

Ticket #8605: vboxshell.patch

File vboxshell.patch, 1.2 KB (added by Technologov, 14 years ago)

Here is my patch, that fixes it. MIT licensed.

  • vboxshell.py

     
    3030import re
    3131import platform
    3232from optparse import OptionParser
    3333
     34if platform.system() == 'Windows' or platform.system() == 'Microsoft':
     35  try:
     36    import win32api
     37  except:
     38    print "ERROR: pywin32 library cannot be loaded."
     39    exit()
     40  fixed_file_info = win32api.GetFileVersionInfo(win32api.__file__, '\\')
     41  pywin32_ver = fixed_file_info['FileVersionLS'] >> 16
     42  if pywin32_ver < 216:
     43    print "Found pywin32 version:", pywin32_ver
     44    print "ERROR: pywin32 version is too old, please install v216 or newer"
     45    exit()
     46  else:
     47    print "Found pywin32 version:", pywin32_ver
     48
    3449g_batchmode = False
    3550g_scripfile = None
    3651g_cmd = None
    3752g_hasreadline = True
     
    32543269        ctx['perf'] = None
    32553270
    32563271    home = getHomeFolder(ctx)
    32573272    checkUserExtensions(ctx, commands, home)
    3258     if platform.system() == 'Windows':
     3273    if platform.system() == 'Windows' or platform.system() == 'Microsoft':
    32593274        global g_hascolors
    32603275        g_hascolors = False
    32613276    hist_file=os.path.join(home, ".vboxshellhistory")
    32623277    autoCompletion(commands, ctx)

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy