changeset 24426:8e477ad46692

merge with stable
author Matt Mackall <mpm@selenic.com>
date Mon, 23 Mar 2015 15:41:43 -0500
parents 3a4122bb9488 (current diff) a2285e2fc949 (diff)
children 811a1842cfe5
files
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/win32.py	Fri Mar 20 23:35:13 2015 -0400
+++ b/mercurial/win32.py	Mon Mar 23 15:41:43 2015 -0500
@@ -279,7 +279,7 @@
     buf = ctypes.create_string_buffer(size + 1)
     len = _kernel32.GetModuleFileNameA(None, ctypes.byref(buf), size)
     if len == 0:
-        raise ctypes.WinError
+        raise ctypes.WinError()
     elif len == size:
         raise ctypes.WinError(_ERROR_INSUFFICIENT_BUFFER)
     return buf.value
@@ -289,7 +289,7 @@
     size = _DWORD(300)
     buf = ctypes.create_string_buffer(size.value + 1)
     if not _advapi32.GetUserNameA(ctypes.byref(buf), ctypes.byref(size)):
-        raise ctypes.WinError
+        raise ctypes.WinError()
     return buf.value
 
 _signalhandler = []
@@ -307,7 +307,7 @@
     h = _SIGNAL_HANDLER(handler)
     _signalhandler.append(h) # needed to prevent garbage collection
     if not _kernel32.SetConsoleCtrlHandler(h, True):
-        raise ctypes.WinError
+        raise ctypes.WinError()
 
 def hidewindow():
 
@@ -349,7 +349,7 @@
     # create handle to list all processes
     ph = _kernel32.CreateToolhelp32Snapshot(_TH32CS_SNAPPROCESS, 0)
     if ph == _INVALID_HANDLE_VALUE:
-        raise ctypes.WinError
+        raise ctypes.WinError()
     try:
         r = _kernel32.Process32First(ph, ctypes.byref(pe))
         # loop over all processes
@@ -361,7 +361,7 @@
     finally:
         _kernel32.CloseHandle(ph)
     if _kernel32.GetLastError() != _ERROR_NO_MORE_FILES:
-        raise ctypes.WinError
+        raise ctypes.WinError()
     return None # no child found
 
 class _tochildpid(int): # pid is _DWORD, which always matches in an int
@@ -413,7 +413,7 @@
         None, args, None, None, False, _CREATE_NO_WINDOW,
         env, os.getcwd(), ctypes.byref(si), ctypes.byref(pi))
     if not res:
-        raise ctypes.WinError
+        raise ctypes.WinError()
 
     # _tochildpid because the process is the child of COMSPEC
     return _tochildpid(pi.dwProcessId)