Add a fallback for CPU arch detection

`platform.processor()` seems to be returning '' a lot where it
wasn't before. Not sure why, but let's add a fallback to
`platform.machine()` to give us another shot at getting a value.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2023-05-11 17:28:56 -07:00
parent 03d2afb071
commit ab12637305
1 changed files with 2 additions and 0 deletions

View File

@ -43,6 +43,8 @@ from six.moves.urllib.request import urlopen
# directory.
SCRIPTDIR = os.path.abspath(os.path.dirname(sys.argv[0]))
CPUARCH = platform.processor()
if not CPUARCH:
CPUARCH = platform.machine()
logger = logging.getLogger('createhdds')
def handle_size(size):