Skip to content

Commit 6ffc70d

Browse files
authored
Adjust SUBPROCESS_TIMEOUT for Raspberry Pi (#271)
1 parent c75731c commit 6ffc70d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

platform.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@
4343
from platformio.package.manager.tool import ToolPackageManager
4444

4545
# Constants
46+
try:
47+
with open('/proc/device-tree/model') as f:
48+
SUBPROCESS_TIMEOUT = 900 if 'raspberry pi' in f.read().lower() else 300
49+
except:
50+
SUBPROCESS_TIMEOUT = 300
4651
RETRY_LIMIT = 3
47-
SUBPROCESS_TIMEOUT = 300
4852
DEFAULT_DEBUG_SPEED = "5000"
4953
DEFAULT_APP_OFFSET = "0x10000"
5054
tl_install_name = "tool-esp_install"

0 commit comments

Comments
 (0)