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
10 changes: 1 addition & 9 deletions src/azure/cli/__main__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
import time
_import_time = time.perf_counter()

import sys

import azure.cli.main
from azure.cli._logging import logging

try:
sys.exit(azure.cli.main.main(sys.argv[1:]))
finally:
# Note: script time includes idle and network time
logging.info('Execution time: %8.3fms', 1000 * (time.perf_counter() - _import_time))
sys.exit(azure.cli.main.main(sys.argv[1:]))
2 changes: 1 addition & 1 deletion src/azure/cli/_argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def execute(self, args, show_usage=False, show_completions=False, out=sys.stdout
all_global_args = set(a.lstrip('-/') for a in self.help_args | self.complete_args | self.global_args)
def not_global(a):
return a.lstrip('-/') not in all_global_args
it = filter(not_global, args)
it = filter(not_global, args).__iter__()

m = self.noun_map
nouns = []
Expand Down
4 changes: 2 additions & 2 deletions src/azure/cli/_session.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import collections.abc
import collections

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect that you should try to import collections.abc and import collections on failure.

import json
import os
import time

from codecs import open

class Session(collections.abc.MutableMapping):
class Session(collections.MutableMapping):
'''A simple dict-like class that is backed by a JSON file.

All direct modifications will save the file. Indirect modifications should
Expand Down