Skip to content

Commit 0c0de61

Browse files
authored
Add files via upload
1 parent 1e95a5d commit 0c0de61

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

pyfoxfile.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,9 +409,18 @@ def decode_unicode_escape(value):
409409
__version__ = str(__version_info__[0]) + "." + str(__version_info__[1]) + "." + str(__version_info__[2])
410410

411411
# Robust bitness detection
412-
# Works on Py2 & Py3, all platforms
412+
# Works on Py2 & Py3, all platform
413+
414+
# Python interpreter bitness
413415
PyBitness = "64" if struct.calcsize("P") * 8 == 64 else ("64" if sys.maxsize > 2**32 else "32")
414416

417+
# Operating system bitness
418+
try:
419+
OSBitness = platform.architecture()[0].replace("bit", "")
420+
except Exception:
421+
m = platform.machine().lower()
422+
OSBitness = "64" if "64" in m else "32"
423+
415424
geturls_ua_pyfile_python = "Mozilla/5.0 (compatible; {proname}/{prover}; +{prourl})".format(
416425
proname=__project__, prover=__version__, prourl=__project_url__)
417426
if(platform.python_implementation() != ""):

0 commit comments

Comments
 (0)