VirtualBox

忽略:
時間撮記:
2016-6-22 下午09:21:53 (8 年 以前)
作者:
vboxsync
訊息:

testdriver: pylint 1.5.5 fixes

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/ValidationKit/testdriver/winbase.py

    r56295 r61833  
    3535
    3636# Windows specific imports.
    37 import win32api;            # pylint: disable=F0401
    38 import win32con;            # pylint: disable=F0401
    39 import win32console;        # pylint: disable=F0401
    40 import win32event;          # pylint: disable=F0401
    41 import win32process;        # pylint: disable=F0401
     37import win32api;            # pylint: disable=import-error
     38import win32con;            # pylint: disable=import-error
     39import win32console;        # pylint: disable=import-error
     40import win32event;          # pylint: disable=import-error
     41import win32process;        # pylint: disable=import-error
    4242
    4343# Validation Kit imports.
     
    5757    """
    5858    try:
     59        # pylint: disable=no-member
    5960        win32console.GenerateConsoleCtrlEvent(win32con.CTRL_BREAK_EVENT, uPid);
    6061        #GenerateConsoleCtrlEvent = ctypes.windll.kernel32.GenerateConsoleCtrlEvent
     
    7172    fRc = False;
    7273    try:
    73         win32api.PostThreadMessage(uTid, win32con.WM_CLOSE, 0, 0);
     74        win32api.PostThreadMessage(uTid, win32con.WM_CLOSE, 0, 0);                                  # pylint: disable=no-member
    7475        fRc = True;
    7576    except:
     
    8182    fRc = False;
    8283    try:
    83         win32api.PostThreadMessage(uTid, win32con.WM_QUIT, 0x40010004, 0); # DBG_TERMINATE_PROCESS
     84        win32api.PostThreadMessage(uTid, win32con.WM_QUIT, 0x40010004, 0); # DBG_TERMINATE_PROCESS  # pylint: disable=no-member
    8485        fRc = True;
    8586    except:
     
    8990def processTerminate(uPid):
    9091    """ The Windows version of base.processTerminate """
     92    # pylint: disable=no-member
    9193    fRc = False;
    9294    try:
     
    109111def processExists(uPid):
    110112    """ The Windows version of base.processExists """
     113    # pylint: disable=no-member
    111114    fRc = False;
    112115    try:
     
    164167
    165168    # Try start the process.
     169    # pylint: disable=no-member
    166170    dwCreationFlags = win32con.CREATE_NEW_PROCESS_GROUP;
    167171    oStartupInfo    = win32process.STARTUPINFO();
     
    188192    # Try get full access to the process.
    189193    try:
    190         hProcessFullAccess = win32api.DuplicateHandle( \
    191             win32api.GetCurrentProcess(), \
    192             hProcess, \
    193             win32api.GetCurrentProcess(), \
    194             win32con.PROCESS_TERMINATE \
    195             | win32con.PROCESS_QUERY_INFORMATION \
    196             | win32con.SYNCHRONIZE  \
    197             | win32con.DELETE, \
    198             False, \
     194        hProcessFullAccess = win32api.DuplicateHandle(
     195            win32api.GetCurrentProcess(),
     196            hProcess,
     197            win32api.GetCurrentProcess(),
     198            win32con.PROCESS_TERMINATE
     199            | win32con.PROCESS_QUERY_INFORMATION
     200            | win32con.SYNCHRONIZE
     201            | win32con.DELETE,
     202            False,
    199203            0);
    200204        win32api.CloseHandle(hProcess);
     
    210214    """
    211215    try:
    212         dwWait = win32event.WaitForSingleObject(hProcess, 0);
     216        dwWait = win32event.WaitForSingleObject(hProcess, 0);                                       # pylint: disable=no-member
    213217    except:
    214218        reporter.logXcpt('hProcess=%s %#x' % (hProcess, hProcess,));
     
    222226    """
    223227    try:
    224         win32api.TerminateProcess(hProcess, 0x40010004); # DBG_TERMINATE_PROCESS
     228        win32api.TerminateProcess(hProcess, 0x40010004); # DBG_TERMINATE_PROCESS                    # pylint: disable=no-member
    225229    except:
    226230        reporter.logXcpt('hProcess=%s %#x' % (hProcess, hProcess,));
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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