Commit ccf6c09e by rfkelly0

fix dokan definitions for python 2.5 (some tests fail on 2.5, but many work)

parent 5499a3b2
...@@ -685,12 +685,12 @@ class MountProcess(subprocess.Popen): ...@@ -685,12 +685,12 @@ class MountProcess(subprocess.Popen):
if not hasattr(subprocess.Popen, "terminate"): if not hasattr(subprocess.Popen, "terminate"):
def terminate(self): def terminate(self):
"""Gracefully terminate the subprocess.""" """Gracefully terminate the subprocess."""
kernel32.TerminateProcess(self._handle,-1) kernel32.TerminateProcess(int(self._handle),-1)
if not hasattr(subprocess.Popen, "kill"): if not hasattr(subprocess.Popen, "kill"):
def kill(self): def kill(self):
"""Forcibly terminate the subprocess.""" """Forcibly terminate the subprocess."""
kernel32.TerminateProcess(self._handle,-1) kernel32.TerminateProcess(int(self._handle),-1)
@staticmethod @staticmethod
def _do_mount(data): def _do_mount(data):
......
...@@ -23,6 +23,12 @@ UCHAR = c_ubyte ...@@ -23,6 +23,12 @@ UCHAR = c_ubyte
LPDWORD = POINTER(DWORD) LPDWORD = POINTER(DWORD)
LONGLONG = c_longlong LONGLONG = c_longlong
try:
USHORT = USHORT
except NameError:
# Not available in older python versions
USHORT = c_ushort
DokanVersion.restype = ULONG DokanVersion.restype = ULONG
DokanVersion.argtypes = () DokanVersion.argtypes = ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment