Package: python-cmor
Version: 2.2.0-1
Severity: important

In cmor/check_CMOR_compliant.py, the following expression is used to check for "32bit systems only":

os.uname()[-1].find("64")

This is a very bad method. It will/can fail on:
- alpha (64-bit userspace but no "64" in machine hardware name);
- hppa ("64" in machine hardware name but 32-bit userspace),
- sparc (as above),
- mips* (as above),
- amd64 (as above if in i386 chroot).

A more portable way would be to use something like:

int(platform.architecture()[0].replace('bit', '')) < 64

but I wonder why this check is needed in the first place.

--
Jakub Wilk

Attachment: signature.asc
Description: Digital signature

Reply via email to