Skip to content

Commit 44a5200

Browse files
marc-hblgirdwood
authored andcommitted
xtensa-build-zephyr: fix pylint "Redefine 'platform' from outer scope"
Fixes pylint warning `scripts/xtensa-build-zephyr.py:426:5: W0621: Redefining name 'platform' from outer scope (line 14) (redefined-outer-name)` and reduce "grep confusion": the script uses `platform` A LOT. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
1 parent 730e861 commit 44a5200

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/xtensa-build-zephyr.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import subprocess
1212
import pathlib
1313
import errno
14-
import platform
14+
import platform as py_platform
1515
import sys
1616
import shutil
1717
import multiprocessing
@@ -35,13 +35,13 @@
3535

3636
sof_version = None
3737

38-
if platform.system() == "Windows":
38+
if py_platform.system() == "Windows":
3939
xtensa_tools_version_postfix = "-win32"
40-
elif platform.system() == "Linux":
40+
elif py_platform.system() == "Linux":
4141
xtensa_tools_version_postfix = "-linux"
4242
else:
4343
xtensa_tools_version_postfix = "-unsupportedOS"
44-
warnings.warn(f"Your operating system: {platform.system()} is not supported")
44+
warnings.warn(f"Your operating system: {py_platform.system()} is not supported")
4545

4646
platform_list = [
4747
# Intel platforms

0 commit comments

Comments
 (0)