-
Notifications
You must be signed in to change notification settings - Fork 767
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devel/oci-cli: fix termui breakage after upgrade
- https://click.palletsprojects.com/en/8.1.x/changes/#version-8-1-0 - oracle/oci-cli#684 - oracle/oci-cli#661
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...ch-services_object__storage_src_oci__cli__object__storage_objectstorage__cli__extended.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- services/object_storage/src/oci_cli_object_storage/objectstorage_cli_extended.py.orig 2023-06-07 19:09:16 UTC | ||
+++ services/object_storage/src/oci_cli_object_storage/objectstorage_cli_extended.py | ||
@@ -11,6 +11,7 @@ import os.path | ||
import math | ||
import os | ||
import os.path | ||
+import shutil | ||
import stat | ||
import sys | ||
from mimetypes import guess_type | ||
@@ -3079,7 +3080,7 @@ def _get_progress_bar_label(original_label, object_nam | ||
else: | ||
# If the names are too long then we can end up with multiple progress bars since we overflow a single line. To prevent | ||
# this, make sure that the label won't consume more than half the terminal width | ||
- terminal_width = click.termui.get_terminal_size()[0] / 2 | ||
+ terminal_width = shutil.get_terminal_size()[0] / 2 | ||
remaining_width = terminal_width - (len(prefix) + 1) | ||
|
||
if len(object_name) > remaining_width: |