Skip to content

Commit

Permalink
Always import platform
Browse files Browse the repository at this point in the history
Long gone are the days this was not available
  • Loading branch information
ktf committed Oct 17, 2023
1 parent 75f7295 commit f5af805
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions alibuild_helpers/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import sys
import os
import re
import platform

from datetime import datetime
try:
from collections import OrderedDict
Expand Down Expand Up @@ -141,7 +143,6 @@ def doDetectArch(hasOsRelease, osReleaseLines, platformTuple, pSystem, platformP
if pSystem == "Darwin":
processor = platformProcessor
if not processor:
import platform
if platform.machine() == "x86_64":
processor = "x86-64"

Check warning on line 147 in alibuild_helpers/utilities.py

View check run for this annotation

Codecov / codecov/patch

alibuild_helpers/utilities.py#L144-L147

Added lines #L144 - L147 were not covered by tests
else:
Expand Down Expand Up @@ -200,7 +201,6 @@ def detectArch():
osReleaseLines = []
hasOsRelease = False
try:
import platform
if platform.system() == "Darwin":
if platform.machine() == "x86_64":
return "osx_x86-64"
Expand All @@ -209,7 +209,7 @@ def detectArch():
except:
pass
try:
import platform, distro
import distro
platformTuple = distro.linux_distribution()
platformSystem = platform.system()
platformProcessor = platform.processor()
Expand Down

0 comments on commit f5af805

Please sign in to comment.