Skip to content

Commit

Permalink
Add constants in place of ntsecuritycon import
Browse files Browse the repository at this point in the history
 * Deluge does not package ntsecuritycon so users encounter import error.
  • Loading branch information
cas-- committed Dec 3, 2014
1 parent 6641548 commit e76d99d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion autoshutdown/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@
import ctypes
from win32security import OpenProcessToken, LookupPrivilegeValue, AdjustTokenPrivileges
from win32api import InitiateSystemShutdown, GetCurrentProcess, GetPwrCapabilities
from ntsecuritycon import TOKEN_ADJUST_PRIVILEGES, TOKEN_QUERY, SE_SHUTDOWN_NAME, SE_PRIVILEGE_ENABLED
# Negate need for ntsecuritycon import
TOKEN_QUERY = 8
TOKEN_ADJUST_PRIVILEGES = 32
SE_SHUTDOWN_NAME = "SeShutdownPrivilege"
SE_PRIVILEGE_ENABLED = 2
elif osx_check():
#import subprocess
pass
Expand Down

0 comments on commit e76d99d

Please sign in to comment.