mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
sb: Make the URL output truncate on long long URLs.
This commit is contained in:
parent
a8d64ad94d
commit
87434f6a7c
@ -70,13 +70,10 @@ def _humanize_bytes(bytes, precision = 1):
|
|||||||
return '%.*f%s' % (precision, float(bytes) / factor, suffix)
|
return '%.*f%s' % (precision, float(bytes) / factor, suffix)
|
||||||
|
|
||||||
def _sensible_url(url, used = 0):
|
def _sensible_url(url, used = 0):
|
||||||
if used < 140:
|
space = 200
|
||||||
space = 150 - used - 15
|
|
||||||
else:
|
|
||||||
space = 20
|
|
||||||
if len(url) > space:
|
if len(url) > space:
|
||||||
size = int((space - 5) / 2)
|
size = int(space - 14)
|
||||||
url = url[:size] + ' ... ' + url[-size:]
|
url = url[:size] + '...<see log>'
|
||||||
return url
|
return url
|
||||||
|
|
||||||
def _hash_check(file_, absfile, macros, remove = True):
|
def _hash_check(file_, absfile, macros, remove = True):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user