|
24 | 24 | import re
|
25 | 25 | import time
|
26 | 26 | import argparse
|
27 |
| -import subprocess |
28 | 27 |
|
29 | 28 | # Initialize start_time globally
|
30 | 29 | start_time = -1
|
@@ -147,12 +146,13 @@ def verify_files(filename, destination, rename_to):
|
147 | 146 |
|
148 | 147 | return True
|
149 | 148 |
|
150 |
| -def is_latest_version(filename, destination, dirname, rename_to, cfile, checksum): |
| 149 | +def is_latest_version(destination, dirname, rename_to, cfile, checksum): |
151 | 150 | current_version = None
|
152 | 151 | expected_version = None
|
153 | 152 |
|
154 | 153 | try:
|
155 | 154 | if rename_to.startswith("esp32-arduino-libs"):
|
| 155 | + # Remove this when moving to new release system |
156 | 156 | expected_version = cfile.read(dirname + "/versions.txt").decode("utf-8")
|
157 | 157 | with open(os.path.join(destination, rename_to, "versions.txt"), "r") as f:
|
158 | 158 | # cfile is zip
|
@@ -230,7 +230,7 @@ def unpack(filename, destination, force_extract, checksum): # noqa: C901
|
230 | 230 | rename_to = "esp32-arduino-libs"
|
231 | 231 |
|
232 | 232 | if not force_extract:
|
233 |
| - if is_latest_version(filename, destination, dirname, rename_to, cfile, checksum): |
| 233 | + if is_latest_version(destination, dirname, rename_to, cfile, checksum): |
234 | 234 | if verify_files(filename, destination, rename_to):
|
235 | 235 | print(" Files ok. Skipping Extraction")
|
236 | 236 | return True
|
|
0 commit comments