Describe the bug
Calling get_mode on a Windows machine which is a member of a domain but which is disconnected from its domain controller produces an exception from win32security.LookupAccountSid().
Your configuration
Windows 10 x64, Python 3.7, oschmod==0.3.9
Steps to reproduce
oschmod.get_mode(pathname)
What happened
Traceback (most recent call last)
File "...\oschmod\__init__.py", line 163, in get_mode
return win_get_permissions(path)
File "...\oschmod\__init__.py", line 364, in win_get_permissions
return _win_get_permissions(path, get_object_type(path))
File "...\oschmod\__init__.py", line 387, in _win_get_permissions
win32security.LookupAccountSid(None, ace[2]) != \
pywintypes.error: (1789, 'LookupAccountSid', 'The trust relationship between this workstation and the primary domain controller failed.')
Additional context
I'm not an expert in windows security (traceback was retyped from a screenshot of a teamviewer session!) so am not sure if this is even resolvable or oschmod's problem. But apparently being part of a domain, but not connected to a domain controller, is a reasonable scenario for Windows devices.