summaryrefslogtreecommitdiffstats
path: root/Lib/test/symlink_support.py
diff options
context:
space:
mode:
authorBrian Curtin <brian.curtin@gmail.com>2010-07-09 15:58:59 (GMT)
committerBrian Curtin <brian.curtin@gmail.com>2010-07-09 15:58:59 (GMT)
commit74e4561a3cdf9d38caca4573b68e1c72fc489629 (patch)
tree55387806a4c157646ad6a39c37b8657ae3f82edc /Lib/test/symlink_support.py
parentc739569be09d4b271ae8a5d3d566254db6298c55 (diff)
downloadcpython-74e4561a3cdf9d38caca4573b68e1c72fc489629.zip
cpython-74e4561a3cdf9d38caca4573b68e1c72fc489629.tar.gz
cpython-74e4561a3cdf9d38caca4573b68e1c72fc489629.tar.bz2
Re-flow several long lines from #1578269.
Diffstat (limited to 'Lib/test/symlink_support.py')
-rw-r--r--Lib/test/symlink_support.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/test/symlink_support.py b/Lib/test/symlink_support.py
index eab7667..59fa6e6 100644
--- a/Lib/test/symlink_support.py
+++ b/Lib/test/symlink_support.py
@@ -12,7 +12,8 @@ from ctypes import wintypes
GetCurrentProcess = ctypes.windll.kernel32.GetCurrentProcess
GetCurrentProcess.restype = wintypes.HANDLE
OpenProcessToken = ctypes.windll.advapi32.OpenProcessToken
-OpenProcessToken.argtypes = (wintypes.HANDLE, wintypes.DWORD, ctypes.POINTER(wintypes.HANDLE))
+OpenProcessToken.argtypes = (wintypes.HANDLE, wintypes.DWORD,
+ ctypes.POINTER(wintypes.HANDLE))
OpenProcessToken.restype = wintypes.BOOL
class LUID(ctypes.Structure):
@@ -91,7 +92,8 @@ class TOKEN_PRIVILEGES(ctypes.Structure):
def get_array(self):
array_type = LUID_AND_ATTRIBUTES*self.count
- privileges = ctypes.cast(self.privileges, ctypes.POINTER(array_type)).contents
+ privileges = ctypes.cast(self.privileges,
+ ctypes.POINTER(array_type)).contents
return privileges
def __iter__(self):
@@ -133,7 +135,8 @@ def get_process_token():
def get_symlink_luid():
"Get the LUID for the SeCreateSymbolicLinkPrivilege"
symlink_luid = LUID()
- res = LookupPrivilegeValue(None, "SeCreateSymbolicLinkPrivilege", symlink_luid)
+ res = LookupPrivilegeValue(None, "SeCreateSymbolicLinkPrivilege",
+ symlink_luid)
if not res > 0:
raise RuntimeError("Couldn't lookup privilege value")
return symlink_luid