mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 12:59:36 -07:00
Merge pull request #1420 from clinton-hall/fix/pywin32
Fix pywin32 imports
This commit is contained in:
commit
c84cc98ba4
1 changed files with 4 additions and 3 deletions
|
@ -1312,11 +1312,12 @@ class RunningProcess(object):
|
||||||
|
|
||||||
class WindowsProcess(object):
|
class WindowsProcess(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
self.mutex = None
|
||||||
self.mutexname = "nzbtomedia_{pid}".format(pid=core.PID_FILE.replace('\\', '/')) # {D0E858DF-985E-4907-B7FB-8D732C3FC3B9}"
|
self.mutexname = "nzbtomedia_{pid}".format(pid=core.PID_FILE.replace('\\', '/')) # {D0E858DF-985E-4907-B7FB-8D732C3FC3B9}"
|
||||||
if platform.system() == 'Windows':
|
if platform.system() == 'Windows':
|
||||||
from win32event import CreateMutex
|
from win32.win32event import CreateMutex
|
||||||
from win32api import CloseHandle, GetLastError
|
from win32.win32api import CloseHandle, GetLastError
|
||||||
from winerror import ERROR_ALREADY_EXISTS
|
from win32.lib.winerror import ERROR_ALREADY_EXISTS
|
||||||
self.CreateMutex = CreateMutex
|
self.CreateMutex = CreateMutex
|
||||||
self.CloseHandle = CloseHandle
|
self.CloseHandle = CloseHandle
|
||||||
self.GetLastError = GetLastError
|
self.GetLastError = GetLastError
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue