Skip to content

Commit e07a05e

Browse files
author
Shubham
committed
Avoid using os.getuid() for Windows
os.getuid() is not defined for Windows. Instead set user_id = 0 when running on Windows.
1 parent 198be4f commit e07a05e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/common.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ class SyncServerConfig:
5555
def start_sync_server() -> typing.Union[SyncServerConfig, None]:
5656
""" Starts the ObjectBox Sync Server in a Docker container. """
5757
current_dir = os.path.dirname(os.path.realpath(__file__))
58-
user_id = os.getuid()
58+
user_id = None
59+
if os.name != 'nt':
60+
user_id = os.getuid()
61+
else:
62+
user_id = 0
5963
try:
6064
command = ("docker run "
6165
"--rm "

0 commit comments

Comments
 (0)