Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix pylint warnings
  • Loading branch information
derekbekoe committed May 4, 2016
commit b3ba7f879cf9693cdb1f676fee0c97a3369e8f4d
9 changes: 6 additions & 3 deletions src/azure/cli/_logging.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import os
import platform
import logging
import colorama
from logging.handlers import RotatingFileHandler

import colorama

AZ_LOGFILE_NAME = 'az.log'
DEFAULT_LOG_DIR = os.path.expanduser(os.path.join('~', '.azure', 'logs'))

Expand Down Expand Up @@ -101,8 +102,10 @@ def format(self, record):
return msg

def _init_console_handlers(root_logger, az_logger, log_level_config):
root_logger.addHandler(CustomStreamHandler(log_level_config['root'], CONSOLE_LOG_FORMAT['root']))
az_logger.addHandler(CustomStreamHandler(log_level_config['az'], CONSOLE_LOG_FORMAT['az']))
root_logger.addHandler(CustomStreamHandler(log_level_config['root'],
CONSOLE_LOG_FORMAT['root']))
az_logger.addHandler(CustomStreamHandler(log_level_config['az'],
CONSOLE_LOG_FORMAT['az']))

def _get_log_file_path():
log_dir = LOG_DIR or DEFAULT_LOG_DIR
Expand Down
2 changes: 1 addition & 1 deletion src/azure/cli/_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def find_from_user_account(self, username, password):
def find_through_interactive_flow(self):
context = self._create_auth_context(COMMON_TENANT)
code = context.acquire_user_code(self._resource, CLIENT_ID)
logger.warn(code['message'])
logger.warning(code['message'])
token_entry = context.acquire_token_with_device_code(self._resource, code, CLIENT_ID)
self.user_id = token_entry[_TOKEN_ENTRY_USER_ID]
result = self._find_using_common_tenant(token_entry[_ACCESS_TOKEN])
Expand Down
2 changes: 1 addition & 1 deletion src/azure/cli/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def get_command_table(module_name=None):
loaded = True
except ImportError:
# Unknown command - we'll load all installed modules below
logger.info("Unable to load command table from module '%s'. Will load all installed modules.", module_name)
logger.info("Unable to load command table from module '%s'. Will load all installed modules.", module_name) #pylint: disable=line-too-long

if not loaded:
command_table = {}
Expand Down