mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 15:22:38 -04:00
Remove string conversion of the ACL, fix setup
This commit is contained in:
parent
59a66a401c
commit
c9198b813f
2 changed files with 4 additions and 3 deletions
|
|
@ -152,18 +152,18 @@ def _compare_dacls(dacl1, dacl2):
|
|||
aces1 = [dacl1.GetAce(index) for index in range(0, dacl1.GetAceCount())]
|
||||
aces2 = [dacl2.GetAce(index) for index in range(0, dacl2.GetAceCount())]
|
||||
|
||||
# Convert PySIDs into hashable objects
|
||||
# Convert PySIDs into hashable objects
|
||||
aces1_refined = []
|
||||
aces2_refined = []
|
||||
for ace in aces1:
|
||||
if len(ace) == 3:
|
||||
aces1_refined.append((ace[0], ace[1], str(ace[2])))
|
||||
else:
|
||||
aces1_refined.append((ace[0], ace[1], ace[2], ace[3], str(ace[4]))) # type: ignore
|
||||
aces1_refined.append((ace[0], ace[1], ace[2], ace[3], ace[4])) # type: ignore
|
||||
for index, ace in enumerate(aces2):
|
||||
if len(ace) == 3:
|
||||
aces2_refined.append((ace[0], ace[1], str(ace[2])))
|
||||
else:
|
||||
aces2_refined.append((ace[0], ace[1], ace[2], ace[3], str(ace[4]))) # type: ignore
|
||||
aces2_refined.append((ace[0], ace[1], ace[2], ace[3], ace[4])) # type: ignore
|
||||
|
||||
return set(aces1_refined) == set(aces2_refined)
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ ADMINS_SID = 'S-1-5-32-544'
|
|||
class WindowsChmodTests(TempDirTestCase):
|
||||
"""Unit tests for Windows chmod function in filesystem module"""
|
||||
def setUp(self):
|
||||
super(WindowsChmodTests, self).setUp()
|
||||
self.probe_path = _create_probe(self.tempdir)
|
||||
|
||||
def test_symlink_resolution(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue