Skip to content

Commit c6d9809

Browse files
committed
Move ctypes import from top level into a function, since it's not available on WASI
1 parent 6da6ef0 commit c6d9809

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_android.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import sys
66
import unittest
77
from contextlib import contextmanager
8-
from ctypes import CDLL, c_char_p, c_int
98
from threading import Thread
109
from time import time
1110

@@ -37,6 +36,7 @@ def logcat_thread():
3736
self.logcat_process.stdout.close()
3837
Thread(target=logcat_thread).start()
3938

39+
from ctypes import CDLL, c_char_p, c_int
4040
android_log_write = getattr(CDLL("liblog.so"), "__android_log_write")
4141
android_log_write.argtypes = (c_int, c_char_p, c_char_p)
4242
ANDROID_LOG_INFO = 4

0 commit comments

Comments
 (0)