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:
parent
fc326df600
commit
ef00f5d12d
1 changed files with 1 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue