Commit 5de3c77
committed
Guard the Windows-only windows_window_manage import
ctypes.WINFUNCTYPE is only defined on Windows; Linux's ctypes raises
``ImportError: cannot import name 'WINFUNCTYPE'`` when
``windows.window.windows_window_manage`` is loaded. My new
Docker / Linux CI workflow exposed this pre-existing unconditional
import in the package facade.
Gate the import on ``sys.platform`` so ``import je_auto_control``
keeps working on macOS / Linux; the wrappers in
``auto_control_window`` already check the platform and raise
``NotImplementedError`` for the Windows-only operations on other
OSes, so non-Windows callers see a clean error instead of an
import-time crash.1 parent a7a129a commit 5de3c77
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
296 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
297 | 305 | | |
298 | 306 | | |
299 | 307 | | |
| |||
0 commit comments