mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-27 01:39:45 +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 os
|
||||||
import pwd
|
import pwd
|
||||||
import re
|
import re
|
||||||
try:
|
from shutil import get_terminal_size
|
||||||
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])))
|
|
||||||
import sys
|
import sys
|
||||||
import platform
|
import platform
|
||||||
import time
|
import time
|
||||||
|
|
Loading…
Reference in a new issue