1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-01-26 09:19:02 +00:00

we always have shutil.get_terminal_size on py 3.3+

This commit is contained in:
Thomas Waldmann 2015-12-15 00:41:50 +01:00
parent fc326df600
commit ef00f5d12d

View file

@ -6,12 +6,7 @@
import os
import pwd
import re
try:
from shutil import get_terminal_size
except ImportError:
def get_terminal_size(fallback=(80, 24)):
TerminalSize = namedtuple('TerminalSize', ['columns', 'lines'])
return TerminalSize(int(os.environ.get('COLUMNS', fallback[0])), int(os.environ.get('LINES', fallback[1])))
from shutil import get_terminal_size
import sys
import platform
import time