mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 17:12:13 -06:00
give up, just try both and see what sticks
This commit is contained in:
parent
edf0d3684c
commit
0696610dee
|
@ -837,7 +837,11 @@ def chkcmd(*argv):
|
||||||
def gzip_orig_sz(fn):
|
def gzip_orig_sz(fn):
|
||||||
with open(fsenc(fn), "rb") as f:
|
with open(fsenc(fn), "rb") as f:
|
||||||
f.seek(-4, 2)
|
f.seek(-4, 2)
|
||||||
return struct.unpack(b"I", f.read(4))[0]
|
rv = f.read(4)
|
||||||
|
try:
|
||||||
|
return struct.unpack(b"I", rv)[0]
|
||||||
|
except:
|
||||||
|
return struct.unpack("I", rv)[0]
|
||||||
|
|
||||||
|
|
||||||
def py_desc():
|
def py_desc():
|
||||||
|
@ -847,7 +851,11 @@ def py_desc():
|
||||||
if ofs > 0:
|
if ofs > 0:
|
||||||
py_ver = py_ver[:ofs]
|
py_ver = py_ver[:ofs]
|
||||||
|
|
||||||
bitness = struct.calcsize(b"P") * 8
|
try:
|
||||||
|
bitness = struct.calcsize(b"P") * 8
|
||||||
|
except:
|
||||||
|
bitness = struct.calcsize("P") * 8
|
||||||
|
|
||||||
host_os = platform.system()
|
host_os = platform.system()
|
||||||
compiler = platform.python_compiler()
|
compiler = platform.python_compiler()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue