diff --git a/pg_view.py b/pg_view.py index 0e1c889..729c209 100644 --- a/pg_view.py +++ b/pg_view.py @@ -468,7 +468,7 @@ def _trim_text_middle(val, maxw): This kind of trimming seems to be better than tail trimming for user and database names. """ - half = (maxw - 2) / 2 + half = int((maxw - 2) / 2) return val[:half] + '..' + val[-half:] def _do_refresh(self, new_rows):