{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-cli/pulls/comments/79904357","id":79904357,"diff_hunk":"@@ -53,12 +53,11 @@\n \n _AUTH_CTX_FACTORY = lambda authority, cache: adal.AuthenticationContext(authority, cache=cache)\n \n-def _read_file_content(file_path):\n-    file_text = None\n+def _load_tokens_from_file(file_path):\n+    all_entries = []\n     if os.path.isfile(file_path):\n-        with codecs_open(file_path, 'r', encoding='ascii') as file_to_read:\n-            file_text = file_to_read.read()\n-    return file_text\n+        all_entries = get_file_json(file_path, no_throw_on_empty=True) or []","path":"src/azure-cli-core/azure/cli/core/_profile.py","position":21,"original_position":21,"commit_id":"48f7d07427c52ecb1d8fd4355579fc76c25c2536","original_commit_id":"48f7d07427c52ecb1d8fd4355579fc76c25c2536","user":{"login":"johanste","id":15110018,"avatar_url":"https://avatars.githubusercontent.com/u/15110018?v=3","gravatar_id":"","url":"https://api.github.com/users/johanste","html_url":"https://github.com/johanste","followers_url":"https://api.github.com/users/johanste/followers","following_url":"https://api.github.com/users/johanste/following{/other_user}","gists_url":"https://api.github.com/users/johanste/gists{/gist_id}","starred_url":"https://api.github.com/users/johanste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanste/subscriptions","organizations_url":"https://api.github.com/users/johanste/orgs","repos_url":"https://api.github.com/users/johanste/repos","events_url":"https://api.github.com/users/johanste/events{/privacy}","received_events_url":"https://api.github.com/users/johanste/received_events","type":"User","site_admin":false},"body":"Should you check the file for the correct permissions (0x600)","created_at":"2016-09-21T18:45:00Z","updated_at":"2016-09-21T18:45:00Z","html_url":"https://github.com/Azure/azure-cli/pull/938#discussion_r79904357","pull_request_url":"https://api.github.com/repos/Azure/azure-cli/pulls/938","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/comments/79904357"},"html":{"href":"https://github.com/Azure/azure-cli/pull/938#discussion_r79904357"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/938"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-cli/pulls/938","id":86094241,"html_url":"https://github.com/Azure/azure-cli/pull/938","diff_url":"https://github.com/Azure/azure-cli/pull/938.diff","patch_url":"https://github.com/Azure/azure-cli/pull/938.patch","issue_url":"https://api.github.com/repos/Azure/azure-cli/issues/938","number":938,"state":"open","locked":false,"title":"use common utils to persist accessTokens.json","user":{"login":"yugangw-msft","id":6014209,"avatar_url":"https://avatars.githubusercontent.com/u/6014209?v=3","gravatar_id":"","url":"https://api.github.com/users/yugangw-msft","html_url":"https://github.com/yugangw-msft","followers_url":"https://api.github.com/users/yugangw-msft/followers","following_url":"https://api.github.com/users/yugangw-msft/following{/other_user}","gists_url":"https://api.github.com/users/yugangw-msft/gists{/gist_id}","starred_url":"https://api.github.com/users/yugangw-msft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yugangw-msft/subscriptions","organizations_url":"https://api.github.com/users/yugangw-msft/orgs","repos_url":"https://api.github.com/users/yugangw-msft/repos","events_url":"https://api.github.com/users/yugangw-msft/events{/privacy}","received_events_url":"https://api.github.com/users/yugangw-msft/received_events","type":"User","site_admin":false},"body":"With this PR, access token persisting is consistent with the rest system","created_at":"2016-09-21T03:55:31Z","updated_at":"2016-09-21T18:45:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"11e45ba78edd58792ccade154913f1829bc41689","assignee":{"login":"BurtBiel","id":10136041,"avatar_url":"https://avatars.githubusercontent.com/u/10136041?v=3","gravatar_id":"","url":"https://api.github.com/users/BurtBiel","html_url":"https://github.com/BurtBiel","followers_url":"https://api.github.com/users/BurtBiel/followers","following_url":"https://api.github.com/users/BurtBiel/following{/other_user}","gists_url":"https://api.github.com/users/BurtBiel/gists{/gist_id}","starred_url":"https://api.github.com/users/BurtBiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BurtBiel/subscriptions","organizations_url":"https://api.github.com/users/BurtBiel/orgs","repos_url":"https://api.github.com/users/BurtBiel/repos","events_url":"https://api.github.com/users/BurtBiel/events{/privacy}","received_events_url":"https://api.github.com/users/BurtBiel/received_events","type":"User","site_admin":false},"assignees":[{"login":"BurtBiel","id":10136041,"avatar_url":"https://avatars.githubusercontent.com/u/10136041?v=3","gravatar_id":"","url":"https://api.github.com/users/BurtBiel","html_url":"https://github.com/BurtBiel","followers_url":"https://api.github.com/users/BurtBiel/followers","following_url":"https://api.github.com/users/BurtBiel/following{/other_user}","gists_url":"https://api.github.com/users/BurtBiel/gists{/gist_id}","starred_url":"https://api.github.com/users/BurtBiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BurtBiel/subscriptions","organizations_url":"https://api.github.com/users/BurtBiel/orgs","repos_url":"https://api.github.com/users/BurtBiel/repos","events_url":"https://api.github.com/users/BurtBiel/events{/privacy}","received_events_url":"https://api.github.com/users/BurtBiel/received_events","type":"User","site_admin":false},{"login":"johanste","id":15110018,"avatar_url":"https://avatars.githubusercontent.com/u/15110018?v=3","gravatar_id":"","url":"https://api.github.com/users/johanste","html_url":"https://github.com/johanste","followers_url":"https://api.github.com/users/johanste/followers","following_url":"https://api.github.com/users/johanste/following{/other_user}","gists_url":"https://api.github.com/users/johanste/gists{/gist_id}","starred_url":"https://api.github.com/users/johanste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanste/subscriptions","organizations_url":"https://api.github.com/users/johanste/orgs","repos_url":"https://api.github.com/users/johanste/repos","events_url":"https://api.github.com/users/johanste/events{/privacy}","received_events_url":"https://api.github.com/users/johanste/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-cli/pulls/938/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-cli/pulls/938/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-cli/issues/938/comments","statuses_url":"https://api.github.com/repos/Azure/azure-cli/statuses/48f7d07427c52ecb1d8fd4355579fc76c25c2536","head":{"label":"yugangw-msft:utf","ref":"utf","sha":"48f7d07427c52ecb1d8fd4355579fc76c25c2536","user":{"login":"yugangw-msft","id":6014209,"avatar_url":"https://avatars.githubusercontent.com/u/6014209?v=3","gravatar_id":"","url":"https://api.github.com/users/yugangw-msft","html_url":"https://github.com/yugangw-msft","followers_url":"https://api.github.com/users/yugangw-msft/followers","following_url":"https://api.github.com/users/yugangw-msft/following{/other_user}","gists_url":"https://api.github.com/users/yugangw-msft/gists{/gist_id}","starred_url":"https://api.github.com/users/yugangw-msft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yugangw-msft/subscriptions","organizations_url":"https://api.github.com/users/yugangw-msft/orgs","repos_url":"https://api.github.com/users/yugangw-msft/repos","events_url":"https://api.github.com/users/yugangw-msft/events{/privacy}","received_events_url":"https://api.github.com/users/yugangw-msft/received_events","type":"User","site_admin":false},"repo":{"id":64246644,"name":"azure-cli","full_name":"yugangw-msft/azure-cli","owner":{"login":"yugangw-msft","id":6014209,"avatar_url":"https://avatars.githubusercontent.com/u/6014209?v=3","gravatar_id":"","url":"https://api.github.com/users/yugangw-msft","html_url":"https://github.com/yugangw-msft","followers_url":"https://api.github.com/users/yugangw-msft/followers","following_url":"https://api.github.com/users/yugangw-msft/following{/other_user}","gists_url":"https://api.github.com/users/yugangw-msft/gists{/gist_id}","starred_url":"https://api.github.com/users/yugangw-msft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yugangw-msft/subscriptions","organizations_url":"https://api.github.com/users/yugangw-msft/orgs","repos_url":"https://api.github.com/users/yugangw-msft/repos","events_url":"https://api.github.com/users/yugangw-msft/events{/privacy}","received_events_url":"https://api.github.com/users/yugangw-msft/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yugangw-msft/azure-cli","description":"Command-line tools for Azure.","fork":true,"url":"https://api.github.com/repos/yugangw-msft/azure-cli","forks_url":"https://api.github.com/repos/yugangw-msft/azure-cli/forks","keys_url":"https://api.github.com/repos/yugangw-msft/azure-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yugangw-msft/azure-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yugangw-msft/azure-cli/teams","hooks_url":"https://api.github.com/repos/yugangw-msft/azure-cli/hooks","issue_events_url":"https://api.github.com/repos/yugangw-msft/azure-cli/issues/events{/number}","events_url":"https://api.github.com/repos/yugangw-msft/azure-cli/events","assignees_url":"https://api.github.com/repos/yugangw-msft/azure-cli/assignees{/user}","branches_url":"https://api.github.com/repos/yugangw-msft/azure-cli/branches{/branch}","tags_url":"https://api.github.com/repos/yugangw-msft/azure-cli/tags","blobs_url":"https://api.github.com/repos/yugangw-msft/azure-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yugangw-msft/azure-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yugangw-msft/azure-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/yugangw-msft/azure-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yugangw-msft/azure-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/yugangw-msft/azure-cli/languages","stargazers_url":"https://api.github.com/repos/yugangw-msft/azure-cli/stargazers","contributors_url":"https://api.github.com/repos/yugangw-msft/azure-cli/contributors","subscribers_url":"https://api.github.com/repos/yugangw-msft/azure-cli/subscribers","subscription_url":"https://api.github.com/repos/yugangw-msft/azure-cli/subscription","commits_url":"https://api.github.com/repos/yugangw-msft/azure-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/yugangw-msft/azure-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/yugangw-msft/azure-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/yugangw-msft/azure-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/yugangw-msft/azure-cli/contents/{+path}","compare_url":"https://api.github.com/repos/yugangw-msft/azure-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yugangw-msft/azure-cli/merges","archive_url":"https://api.github.com/repos/yugangw-msft/azure-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yugangw-msft/azure-cli/downloads","issues_url":"https://api.github.com/repos/yugangw-msft/azure-cli/issues{/number}","pulls_url":"https://api.github.com/repos/yugangw-msft/azure-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/yugangw-msft/azure-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/yugangw-msft/azure-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yugangw-msft/azure-cli/labels{/name}","releases_url":"https://api.github.com/repos/yugangw-msft/azure-cli/releases{/id}","deployments_url":"https://api.github.com/repos/yugangw-msft/azure-cli/deployments","created_at":"2016-07-26T18:58:36Z","updated_at":"2016-07-26T18:58:39Z","pushed_at":"2016-09-21T16:32:25Z","git_url":"git://github.com/yugangw-msft/azure-cli.git","ssh_url":"git@github.com:yugangw-msft/azure-cli.git","clone_url":"https://github.com/yugangw-msft/azure-cli.git","svn_url":"https://github.com/yugangw-msft/azure-cli","homepage":null,"size":7175,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"15dee37735f5f536e3523e47dd0ab943d74083b6","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":51040886,"name":"azure-cli","full_name":"Azure/azure-cli","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-cli","description":"Command-line tools for Azure.","fork":false,"url":"https://api.github.com/repos/Azure/azure-cli","forks_url":"https://api.github.com/repos/Azure/azure-cli/forks","keys_url":"https://api.github.com/repos/Azure/azure-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-cli/teams","hooks_url":"https://api.github.com/repos/Azure/azure-cli/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-cli/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-cli/events","assignees_url":"https://api.github.com/repos/Azure/azure-cli/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-cli/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-cli/tags","blobs_url":"https://api.github.com/repos/Azure/azure-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-cli/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-cli/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-cli/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-cli/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-cli/subscription","commits_url":"https://api.github.com/repos/Azure/azure-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-cli/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-cli/merges","archive_url":"https://api.github.com/repos/Azure/azure-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-cli/downloads","issues_url":"https://api.github.com/repos/Azure/azure-cli/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-cli/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-cli/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-cli/deployments","created_at":"2016-02-04T00:21:51Z","updated_at":"2016-09-21T10:16:25Z","pushed_at":"2016-09-21T18:27:32Z","git_url":"git://github.com/Azure/azure-cli.git","ssh_url":"git@github.com:Azure/azure-cli.git","clone_url":"https://github.com/Azure/azure-cli.git","svn_url":"https://github.com/Azure/azure-cli","homepage":null,"size":10296,"stargazers_count":39,"watchers_count":39,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":147,"forks":23,"open_issues":147,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/938"},"html":{"href":"https://github.com/Azure/azure-cli/pull/938"},"issue":{"href":"https://api.github.com/repos/Azure/azure-cli/issues/938"},"comments":{"href":"https://api.github.com/repos/Azure/azure-cli/issues/938/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/938/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/938/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-cli/statuses/48f7d07427c52ecb1d8fd4355579fc76c25c2536"}}}}
{"actor":{"display_login":"johanste"}}