sysutils/hatop: actually works with Python 2.7
Also, fix for terminals larger than 80x25 on Python 3. PR: 242590 Submitted by: meta (myself), maintainer Reviewed by: maintainer
This commit is contained in:
parent
9f0c6e5c4e
commit
1e991cb94a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=519957
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= hatop
|
||||
PORTVERSION= 0.7.7
|
||||
PORTREVISION= 4
|
||||
PORTREVISION= 5
|
||||
DISTVERSIONPREFIX= v
|
||||
CATEGORIES= sysutils net
|
||||
|
||||
@ -14,7 +14,7 @@ LICENSE= GPLv3+
|
||||
|
||||
RUN_DEPENDS= ${LOCALBASE}/sbin/haproxy:net/haproxy
|
||||
|
||||
USES= python:3.6+ shebangfix
|
||||
USES= python:2.7+ shebangfix
|
||||
SHEBANG_FILES= bin/hatop
|
||||
NO_BUILD= yes
|
||||
NO_ARCH= yes
|
||||
|
@ -153,6 +153,15 @@
|
||||
|
||||
def get_width(width, xmax, ncols, idx):
|
||||
# distribute excess space evenly from left to right
|
||||
@@ -1709,7 +1709,7 @@ def get_width(width, xmax, ncols, idx):
|
||||
if idx < (xdiff - (xdiff / ncols) * ncols):
|
||||
width += 1 # compensate rounding
|
||||
width = width + xdiff / ncols
|
||||
- return width
|
||||
+ return int(width)
|
||||
|
||||
def get_cell(width, align, value):
|
||||
s = str(value)
|
||||
@@ -1732,7 +1732,7 @@ def get_head(mode):
|
||||
def get_screenlines(stat):
|
||||
screenlines = []
|
||||
|
Loading…
Reference in New Issue
Block a user