Skip to content

Commit

Permalink
Remove polling indicator string after finishing LRO (Azure#5320)
Browse files Browse the repository at this point in the history
* Remove polling indicator string after finishing LRO

* Add change log to HISTORY.rst

* Remove "Minores Fix" in HISTORY.rst

* Add dependency version in setup.py, sort import
  • Loading branch information
Ernest Wong authored and tjprescott committed Jan 18, 2018
1 parent 4a46eab commit 6b21a7a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions src/azure-cli-core/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions src/azure-cli-core/azure/cli/core/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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


Expand Down
5 changes: 1 addition & 4 deletions src/azure-cli-core/azure/cli/core/commands/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions src/azure-cli-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 6b21a7a

Please sign in to comment.