mirror of
https://pagure.io/fedora-qa/createhdds.git
synced 2024-11-21 15:03:07 +00:00
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:
parent
03d2afb071
commit
ab12637305
@ -43,6 +43,8 @@ from six.moves.urllib.request import urlopen
|
|||||||
# directory.
|
# directory.
|
||||||
SCRIPTDIR = os.path.abspath(os.path.dirname(sys.argv[0]))
|
SCRIPTDIR = os.path.abspath(os.path.dirname(sys.argv[0]))
|
||||||
CPUARCH = platform.processor()
|
CPUARCH = platform.processor()
|
||||||
|
if not CPUARCH:
|
||||||
|
CPUARCH = platform.machine()
|
||||||
logger = logging.getLogger('createhdds')
|
logger = logging.getLogger('createhdds')
|
||||||
|
|
||||||
def handle_size(size):
|
def handle_size(size):
|
||||||
|
Loading…
Reference in New Issue
Block a user