File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 2929import shutil
3030import struct
3131import socket
32+ import struct
3233import hashlib
3334import inspect
3435import datetime
@@ -398,13 +399,7 @@ def decode_unicode_escape(value):
398399
399400# Robust bitness detection
400401# Works on Py2 & Py3, all platforms
401- 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"
402+ PyBitness = "64" if struct .calcsize ("P" ) * 8 == 64 else ("64" if sys .maxsize > 2 ** 32 else "32" )
408403
409404geturls_ua_pyfile_python = "Mozilla/5.0 (compatible; {proname}/{prover}; +{prourl})" .format (
410405 proname = __project__ , prover = __version__ , prourl = __project_url__ )
You can’t perform that action at this time.
0 commit comments