diff --git a/requirements.txt b/requirements.txt index d0d521c438b..d6c72806740 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ adal==0.4.7 argcomplete==1.8.0 -colorama==0.3.7 -humanfriendly==2.4 +colorama==0.3.9 +humanfriendly==4.7 jmespath mock==1.3.0 paramiko==2.0.2 diff --git a/src/azure-cli-core/HISTORY.rst b/src/azure-cli-core/HISTORY.rst index 5f24b632066..a26d227a2b6 100644 --- a/src/azure-cli-core/HISTORY.rst +++ b/src/azure-cli-core/HISTORY.rst @@ -5,6 +5,7 @@ Release History 2.0.26 ++++++ +* Remove polling indicator string after finishing LRO on Windows cmd.exe * Warning that appears when using a configured default has been changed to an INFO level entry. Use --verbose to see. 2.0.25 diff --git a/src/azure-cli-core/azure/cli/core/commands/__init__.py b/src/azure-cli-core/azure/cli/core/commands/__init__.py index ac5843ef2a1..ab6842fe3da 100644 --- a/src/azure-cli-core/azure/cli/core/commands/__init__.py +++ b/src/azure-cli-core/azure/cli/core/commands/__init__.py @@ -432,8 +432,12 @@ def _generate_template_progress(self, correlation_id): # pylint: disable=no-sel logger.info(result) def __call__(self, poller): + import colorama from msrest.exceptions import ClientException + # https://github.com/azure/azure-cli/issues/3555 + colorama.init() + correlation_message = '' self.cli_ctx.get_progress_controller().begin() correlation_id = None @@ -474,6 +478,8 @@ def __call__(self, poller): handle_long_running_operation_exception(client_exception) self.cli_ctx.get_progress_controller().end() + colorama.deinit() + return result diff --git a/src/azure-cli-core/azure/cli/core/commands/progress.py b/src/azure-cli-core/azure/cli/core/commands/progress.py index 5b8856e5db0..8b62462fc21 100644 --- a/src/azure-cli-core/azure/cli/core/commands/progress.py +++ b/src/azure-cli-core/azure/cli/core/commands/progress.py @@ -4,13 +4,10 @@ # -------------------------------------------------------------------------------------------- from __future__ import division import sys -import platform import humanfriendly -BAR_LEN = 70 -if platform.system() == 'Windows': - humanfriendly.erase_line_code = '' +BAR_LEN = 70 class ProgressViewBase(object): diff --git a/src/azure-cli-core/setup.py b/src/azure-cli-core/setup.py index 142e65b088f..af0aef58029 100644 --- a/src/azure-cli-core/setup.py +++ b/src/azure-cli-core/setup.py @@ -53,8 +53,8 @@ 'adal>=0.4.7', 'applicationinsights>=0.11.1', 'argcomplete>=1.8.0', - 'colorama', - 'humanfriendly', + 'colorama>=0.3.9', + 'humanfriendly>=4.7', 'jmespath', 'knack==0.3.1', 'msrest>=0.4.4',