We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d7e4d6 commit 1c519b8Copy full SHA for 1c519b8
1 file changed
pyarchivefile.py
@@ -29,6 +29,7 @@
29
import shutil
30
import struct
31
import socket
32
+import struct
33
import hashlib
34
import inspect
35
import datetime
@@ -398,13 +399,7 @@ def decode_unicode_escape(value):
398
399
400
# Robust bitness detection
401
# Works on Py2 & Py3, all platforms
-try:
402
- import struct
403
- PyBitness = "64" if struct.calcsize("P") * 8 == 64 else "32"
404
-except Exception:
405
- # conservative fallback
406
- m = platform.machine() or ""
407
- PyBitness = "64" if m.endswith("64") else "32"
+PyBitness = "64" if struct.calcsize("P") * 8 == 64 else ("64" if sys.maxsize > 2**32 else "32")
408
409
geturls_ua_pyfile_python = "Mozilla/5.0 (compatible; {proname}/{prover}; +{prourl})".format(
410
proname=__project__, prover=__version__, prourl=__project_url__)
0 commit comments