{"action":"created","comment":{"url":"https://api.github.com/repos/awslabs/aws-shell/pulls/comments/47876207","id":47876207,"diff_hunk":"@@ -75,9 +75,17 @@ def _copy_template_to_config(self, template_path,\n         :type overwrite: bool\n         :param overwrite: (Optional) Determines whether to overwrite the\n             existing config file, if it exists.\n+\n+        :raises: :class:`OSError <exceptions.OSError>`\n         \"\"\"\n         expanded_config_path = os.path.expanduser(config_path)\n         if not overwrite and os.path.isfile(config_path):\n             return\n         else:\n+            try:\n+                config_path_dir_name = os.path.dirname(config_path)\n+                os.makedirs(config_path_dir_name)","path":"awsshell/config.py","position":13,"original_position":13,"commit_id":"b43b4295b415e781ddc203a2e883c8763c8956aa","original_commit_id":"b43b4295b415e781ddc203a2e883c8763c8956aa","user":{"login":"jamesls","id":368057,"avatar_url":"https://avatars.githubusercontent.com/u/368057?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesls","html_url":"https://github.com/jamesls","followers_url":"https://api.github.com/users/jamesls/followers","following_url":"https://api.github.com/users/jamesls/following{/other_user}","gists_url":"https://api.github.com/users/jamesls/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesls/subscriptions","organizations_url":"https://api.github.com/users/jamesls/orgs","repos_url":"https://api.github.com/users/jamesls/repos","events_url":"https://api.github.com/users/jamesls/events{/privacy}","received_events_url":"https://api.github.com/users/jamesls/received_events","type":"User","site_admin":false},"body":"I agree it would be good to consolidate these calls.","created_at":"2015-12-17T07:24:49Z","updated_at":"2015-12-17T07:24:49Z","html_url":"https://github.com/awslabs/aws-shell/pull/62#discussion_r47876207","pull_request_url":"https://api.github.com/repos/awslabs/aws-shell/pulls/62","_links":{"self":{"href":"https://api.github.com/repos/awslabs/aws-shell/pulls/comments/47876207"},"html":{"href":"https://github.com/awslabs/aws-shell/pull/62#discussion_r47876207"},"pull_request":{"href":"https://api.github.com/repos/awslabs/aws-shell/pulls/62"}}},"pull_request":{"url":"https://api.github.com/repos/awslabs/aws-shell/pulls/62","id":53930107,"html_url":"https://github.com/awslabs/aws-shell/pull/62","diff_url":"https://github.com/awslabs/aws-shell/pull/62.diff","patch_url":"https://github.com/awslabs/aws-shell/pull/62.patch","issue_url":"https://api.github.com/repos/awslabs/aws-shell/issues/62","number":62,"state":"open","locked":false,"title":"Fix tests if ~/.aws/shell/ doesn't exist.","user":{"login":"donnemartin","id":5458997,"avatar_url":"https://avatars.githubusercontent.com/u/5458997?v=3","gravatar_id":"","url":"https://api.github.com/users/donnemartin","html_url":"https://github.com/donnemartin","followers_url":"https://api.github.com/users/donnemartin/followers","following_url":"https://api.github.com/users/donnemartin/following{/other_user}","gists_url":"https://api.github.com/users/donnemartin/gists{/gist_id}","starred_url":"https://api.github.com/users/donnemartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donnemartin/subscriptions","organizations_url":"https://api.github.com/users/donnemartin/orgs","repos_url":"https://api.github.com/users/donnemartin/repos","events_url":"https://api.github.com/users/donnemartin/events{/privacy}","received_events_url":"https://api.github.com/users/donnemartin/received_events","type":"User","site_admin":false},"body":"Fixes issues with test_keys.py and test_config.py.  Creates the directory that will contain the awsshellrc config file if it doesn't yet exist.  Once it exists, continues with copying the template config file to ~/.aws/shell/awsshellrc.","created_at":"2015-12-17T03:19:21Z","updated_at":"2015-12-17T07:24:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"da9a7951bfead9ff8fa08900e51ea5d274140bb4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/awslabs/aws-shell/pulls/62/commits","review_comments_url":"https://api.github.com/repos/awslabs/aws-shell/pulls/62/comments","review_comment_url":"https://api.github.com/repos/awslabs/aws-shell/pulls/comments{/number}","comments_url":"https://api.github.com/repos/awslabs/aws-shell/issues/62/comments","statuses_url":"https://api.github.com/repos/awslabs/aws-shell/statuses/b43b4295b415e781ddc203a2e883c8763c8956aa","head":{"label":"awslabs:fix-tests","ref":"fix-tests","sha":"b43b4295b415e781ddc203a2e883c8763c8956aa","user":{"login":"awslabs","id":3299148,"avatar_url":"https://avatars.githubusercontent.com/u/3299148?v=3","gravatar_id":"","url":"https://api.github.com/users/awslabs","html_url":"https://github.com/awslabs","followers_url":"https://api.github.com/users/awslabs/followers","following_url":"https://api.github.com/users/awslabs/following{/other_user}","gists_url":"https://api.github.com/users/awslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/awslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awslabs/subscriptions","organizations_url":"https://api.github.com/users/awslabs/orgs","repos_url":"https://api.github.com/users/awslabs/repos","events_url":"https://api.github.com/users/awslabs/events{/privacy}","received_events_url":"https://api.github.com/users/awslabs/received_events","type":"Organization","site_admin":false},"repo":{"id":43388350,"name":"aws-shell","full_name":"awslabs/aws-shell","owner":{"login":"awslabs","id":3299148,"avatar_url":"https://avatars.githubusercontent.com/u/3299148?v=3","gravatar_id":"","url":"https://api.github.com/users/awslabs","html_url":"https://github.com/awslabs","followers_url":"https://api.github.com/users/awslabs/followers","following_url":"https://api.github.com/users/awslabs/following{/other_user}","gists_url":"https://api.github.com/users/awslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/awslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awslabs/subscriptions","organizations_url":"https://api.github.com/users/awslabs/orgs","repos_url":"https://api.github.com/users/awslabs/repos","events_url":"https://api.github.com/users/awslabs/events{/privacy}","received_events_url":"https://api.github.com/users/awslabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/awslabs/aws-shell","description":"An integrated shell for working with the AWS CLI.","fork":false,"url":"https://api.github.com/repos/awslabs/aws-shell","forks_url":"https://api.github.com/repos/awslabs/aws-shell/forks","keys_url":"https://api.github.com/repos/awslabs/aws-shell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awslabs/aws-shell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awslabs/aws-shell/teams","hooks_url":"https://api.github.com/repos/awslabs/aws-shell/hooks","issue_events_url":"https://api.github.com/repos/awslabs/aws-shell/issues/events{/number}","events_url":"https://api.github.com/repos/awslabs/aws-shell/events","assignees_url":"https://api.github.com/repos/awslabs/aws-shell/assignees{/user}","branches_url":"https://api.github.com/repos/awslabs/aws-shell/branches{/branch}","tags_url":"https://api.github.com/repos/awslabs/aws-shell/tags","blobs_url":"https://api.github.com/repos/awslabs/aws-shell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awslabs/aws-shell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awslabs/aws-shell/git/refs{/sha}","trees_url":"https://api.github.com/repos/awslabs/aws-shell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awslabs/aws-shell/statuses/{sha}","languages_url":"https://api.github.com/repos/awslabs/aws-shell/languages","stargazers_url":"https://api.github.com/repos/awslabs/aws-shell/stargazers","contributors_url":"https://api.github.com/repos/awslabs/aws-shell/contributors","subscribers_url":"https://api.github.com/repos/awslabs/aws-shell/subscribers","subscription_url":"https://api.github.com/repos/awslabs/aws-shell/subscription","commits_url":"https://api.github.com/repos/awslabs/aws-shell/commits{/sha}","git_commits_url":"https://api.github.com/repos/awslabs/aws-shell/git/commits{/sha}","comments_url":"https://api.github.com/repos/awslabs/aws-shell/comments{/number}","issue_comment_url":"https://api.github.com/repos/awslabs/aws-shell/issues/comments{/number}","contents_url":"https://api.github.com/repos/awslabs/aws-shell/contents/{+path}","compare_url":"https://api.github.com/repos/awslabs/aws-shell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awslabs/aws-shell/merges","archive_url":"https://api.github.com/repos/awslabs/aws-shell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awslabs/aws-shell/downloads","issues_url":"https://api.github.com/repos/awslabs/aws-shell/issues{/number}","pulls_url":"https://api.github.com/repos/awslabs/aws-shell/pulls{/number}","milestones_url":"https://api.github.com/repos/awslabs/aws-shell/milestones{/number}","notifications_url":"https://api.github.com/repos/awslabs/aws-shell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awslabs/aws-shell/labels{/name}","releases_url":"https://api.github.com/repos/awslabs/aws-shell/releases{/id}","created_at":"2015-09-29T19:04:16Z","updated_at":"2015-12-17T07:18:27Z","pushed_at":"2015-12-17T03:19:21Z","git_url":"git://github.com/awslabs/aws-shell.git","ssh_url":"git@github.com:awslabs/aws-shell.git","clone_url":"https://github.com/awslabs/aws-shell.git","svn_url":"https://github.com/awslabs/aws-shell","homepage":null,"size":139,"stargazers_count":336,"watchers_count":336,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":24,"forks":7,"open_issues":24,"watchers":336,"default_branch":"master"}},"base":{"label":"awslabs:master","ref":"master","sha":"66b7eccf8c1902ec3d1c60aa691b857085e287fe","user":{"login":"awslabs","id":3299148,"avatar_url":"https://avatars.githubusercontent.com/u/3299148?v=3","gravatar_id":"","url":"https://api.github.com/users/awslabs","html_url":"https://github.com/awslabs","followers_url":"https://api.github.com/users/awslabs/followers","following_url":"https://api.github.com/users/awslabs/following{/other_user}","gists_url":"https://api.github.com/users/awslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/awslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awslabs/subscriptions","organizations_url":"https://api.github.com/users/awslabs/orgs","repos_url":"https://api.github.com/users/awslabs/repos","events_url":"https://api.github.com/users/awslabs/events{/privacy}","received_events_url":"https://api.github.com/users/awslabs/received_events","type":"Organization","site_admin":false},"repo":{"id":43388350,"name":"aws-shell","full_name":"awslabs/aws-shell","owner":{"login":"awslabs","id":3299148,"avatar_url":"https://avatars.githubusercontent.com/u/3299148?v=3","gravatar_id":"","url":"https://api.github.com/users/awslabs","html_url":"https://github.com/awslabs","followers_url":"https://api.github.com/users/awslabs/followers","following_url":"https://api.github.com/users/awslabs/following{/other_user}","gists_url":"https://api.github.com/users/awslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/awslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awslabs/subscriptions","organizations_url":"https://api.github.com/users/awslabs/orgs","repos_url":"https://api.github.com/users/awslabs/repos","events_url":"https://api.github.com/users/awslabs/events{/privacy}","received_events_url":"https://api.github.com/users/awslabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/awslabs/aws-shell","description":"An integrated shell for working with the AWS CLI.","fork":false,"url":"https://api.github.com/repos/awslabs/aws-shell","forks_url":"https://api.github.com/repos/awslabs/aws-shell/forks","keys_url":"https://api.github.com/repos/awslabs/aws-shell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awslabs/aws-shell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awslabs/aws-shell/teams","hooks_url":"https://api.github.com/repos/awslabs/aws-shell/hooks","issue_events_url":"https://api.github.com/repos/awslabs/aws-shell/issues/events{/number}","events_url":"https://api.github.com/repos/awslabs/aws-shell/events","assignees_url":"https://api.github.com/repos/awslabs/aws-shell/assignees{/user}","branches_url":"https://api.github.com/repos/awslabs/aws-shell/branches{/branch}","tags_url":"https://api.github.com/repos/awslabs/aws-shell/tags","blobs_url":"https://api.github.com/repos/awslabs/aws-shell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awslabs/aws-shell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awslabs/aws-shell/git/refs{/sha}","trees_url":"https://api.github.com/repos/awslabs/aws-shell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awslabs/aws-shell/statuses/{sha}","languages_url":"https://api.github.com/repos/awslabs/aws-shell/languages","stargazers_url":"https://api.github.com/repos/awslabs/aws-shell/stargazers","contributors_url":"https://api.github.com/repos/awslabs/aws-shell/contributors","subscribers_url":"https://api.github.com/repos/awslabs/aws-shell/subscribers","subscription_url":"https://api.github.com/repos/awslabs/aws-shell/subscription","commits_url":"https://api.github.com/repos/awslabs/aws-shell/commits{/sha}","git_commits_url":"https://api.github.com/repos/awslabs/aws-shell/git/commits{/sha}","comments_url":"https://api.github.com/repos/awslabs/aws-shell/comments{/number}","issue_comment_url":"https://api.github.com/repos/awslabs/aws-shell/issues/comments{/number}","contents_url":"https://api.github.com/repos/awslabs/aws-shell/contents/{+path}","compare_url":"https://api.github.com/repos/awslabs/aws-shell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awslabs/aws-shell/merges","archive_url":"https://api.github.com/repos/awslabs/aws-shell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awslabs/aws-shell/downloads","issues_url":"https://api.github.com/repos/awslabs/aws-shell/issues{/number}","pulls_url":"https://api.github.com/repos/awslabs/aws-shell/pulls{/number}","milestones_url":"https://api.github.com/repos/awslabs/aws-shell/milestones{/number}","notifications_url":"https://api.github.com/repos/awslabs/aws-shell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awslabs/aws-shell/labels{/name}","releases_url":"https://api.github.com/repos/awslabs/aws-shell/releases{/id}","created_at":"2015-09-29T19:04:16Z","updated_at":"2015-12-17T07:18:27Z","pushed_at":"2015-12-17T03:19:21Z","git_url":"git://github.com/awslabs/aws-shell.git","ssh_url":"git@github.com:awslabs/aws-shell.git","clone_url":"https://github.com/awslabs/aws-shell.git","svn_url":"https://github.com/awslabs/aws-shell","homepage":null,"size":139,"stargazers_count":336,"watchers_count":336,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":24,"forks":7,"open_issues":24,"watchers":336,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/awslabs/aws-shell/pulls/62"},"html":{"href":"https://github.com/awslabs/aws-shell/pull/62"},"issue":{"href":"https://api.github.com/repos/awslabs/aws-shell/issues/62"},"comments":{"href":"https://api.github.com/repos/awslabs/aws-shell/issues/62/comments"},"review_comments":{"href":"https://api.github.com/repos/awslabs/aws-shell/pulls/62/comments"},"review_comment":{"href":"https://api.github.com/repos/awslabs/aws-shell/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/awslabs/aws-shell/pulls/62/commits"},"statuses":{"href":"https://api.github.com/repos/awslabs/aws-shell/statuses/b43b4295b415e781ddc203a2e883c8763c8956aa"}}}}