Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:msalle:extras
gcalcli
gcalcli-python2-terminalsize.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gcalcli-python2-terminalsize.patch of Package gcalcli
--- a/gcalcli/argparsers.py 2020-04-21 14:00:00.000000000 +0200 +++ b/gcalcli/argparsers.py 2020-08-19 19:03:08.295551811 +0200 @@ -5,7 +5,7 @@ from gcalcli.deprecations import parser_allow_deprecated, DeprecatedStoreTrue from gcalcli.printer import valid_color_name from oauth2client import tools -from shutil import get_terminal_size +import os # for popen import copy as _copy import datetime import locale @@ -103,8 +103,9 @@ def get_auto_width(): - console_width = get_terminal_size().columns - day_width = int((console_width - 8) / 7) + # python2 doesn't have get_terminal_size(), use stty size instead. + console_rows, console_width = os.popen('stty size', 'r').read().split() + day_width = int((int(console_width) - 8) / 7) return day_width if day_width > 9 else 10
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor