Skip to content

Commit

Permalink
fixed: test_desync.py shouldn't require pywin32
Browse files Browse the repository at this point in the history
  • Loading branch information
soundmud committed Jul 8, 2020
1 parent a71785e commit 80a87aa
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test_desync.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#! python3
import sys
from multiprocessing import Process
import os
import time

import win32gui
try:
import win32gui
except ModuleNotFoundError:
pass

from soundrts import config
config.mods = "crazymod9beta10"
Expand Down Expand Up @@ -57,8 +61,9 @@ def run_client(n, auto):
clientmain.connect_and_play(auto=auto)

def run_server():
hwnd = win32gui.GetForegroundWindow()
win32gui.MoveWindow(hwnd, 400, 0, 800, 800, True)
if "win32gui" in sys.modules:
hwnd = win32gui.GetForegroundWindow()
win32gui.MoveWindow(hwnd, 400, 0, 800, 800, True)
servermain.start_server(parameters="no_metaserver")


Expand Down

0 comments on commit 80a87aa

Please sign in to comment.