|
6 | 6 | # LICENSE.txt |
7 | 7 | # |
8 | 8 | import ctypes |
9 | | -from ctypes import POINTER, Structure, c_char, c_char_p, cast, c_wchar_p |
| 9 | +from ctypes import POINTER, Structure, c_char_p, cast |
10 | 10 | from ctypes.wintypes import ( |
11 | 11 | BOOL, DWORD, FILETIME, LPCWSTR, LPWSTR) |
12 | 12 |
|
13 | | -from ._common import LPBYTE, _PyBytes_FromStringAndSize, dereference |
| 13 | +from ._common import LPBYTE, _PyBytes_FromStringAndSize |
14 | 14 | from ._util import function_factory, check_false_factory, dlls |
15 | 15 |
|
16 | 16 |
|
@@ -74,14 +74,16 @@ def fromdict(cls, credential): |
74 | 74 | continue |
75 | 75 | data = (PCREDENTIAL_ATTRIBUTE * count)() |
76 | 76 | for index in range(count): |
77 | | - attribute = CREDENTIAL_ATTRIBUTE.fromdict(attributes[index]) |
| 77 | + attribute = CREDENTIAL_ATTRIBUTE.fromdict( |
| 78 | + attributes[index]) |
78 | 79 | data[index] = PCREDENTIAL_ATTRIBUTE(attribute) |
79 | 80 | c_credentials.Attributes = cast(data, PCREDENTIAL_ATTRIBUTE) |
80 | 81 | c_credentials.AttributeCount = count |
81 | 82 | else: |
82 | 83 | setattr(c_credentials, key, credential[key]) |
83 | 84 | return c_credentials |
84 | 85 |
|
| 86 | + |
85 | 87 | _data = [] |
86 | 88 | PCREDENTIAL = POINTER(CREDENTIAL) |
87 | 89 | PPCREDENTIAL = POINTER(PCREDENTIAL) |
|
0 commit comments