{"action":"created","comment":{"url":"https://api.github.com/repos/borgbackup/borg/pulls/comments/50023896","id":50023896,"diff_hunk":"@@ -267,10 +267,14 @@ def find_key_file(cls, repository):\n         get_keys_dir = cls.get_keys_dir\n         id = hexlify(repository.id).decode('ascii')\n         keys_dir = get_keys_dir()\n+        def ex():\n+            raise KeyfileNotFoundError(repository.path, keys_dir)","path":"borg/upgrader.py","position":5,"original_position":5,"commit_id":"9c5d4c23442b0ea45ecda8b7b44136c725d16326","original_commit_id":"9c5d4c23442b0ea45ecda8b7b44136c725d16326","user":{"login":"ThomasWaldmann","id":356103,"avatar_url":"https://avatars.githubusercontent.com/u/356103?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasWaldmann","html_url":"https://github.com/ThomasWaldmann","followers_url":"https://api.github.com/users/ThomasWaldmann/followers","following_url":"https://api.github.com/users/ThomasWaldmann/following{/other_user}","gists_url":"https://api.github.com/users/ThomasWaldmann/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasWaldmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasWaldmann/subscriptions","organizations_url":"https://api.github.com/users/ThomasWaldmann/orgs","repos_url":"https://api.github.com/users/ThomasWaldmann/repos","events_url":"https://api.github.com/users/ThomasWaldmann/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasWaldmann/received_events","type":"User","site_admin":false},"body":"thanks for trying to avoid code duplication, but in this case i think have 1 line duplicate is preferrable to adding a function with just that one line.","created_at":"2016-01-18T17:19:14Z","updated_at":"2016-01-18T17:19:14Z","html_url":"https://github.com/borgbackup/borg/pull/577#discussion_r50023896","pull_request_url":"https://api.github.com/repos/borgbackup/borg/pulls/577","_links":{"self":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/comments/50023896"},"html":{"href":"https://github.com/borgbackup/borg/pull/577#discussion_r50023896"},"pull_request":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/577"}}},"pull_request":{"url":"https://api.github.com/repos/borgbackup/borg/pulls/577","id":56369618,"html_url":"https://github.com/borgbackup/borg/pull/577","diff_url":"https://github.com/borgbackup/borg/pull/577.diff","patch_url":"https://github.com/borgbackup/borg/pull/577.patch","issue_url":"https://api.github.com/repos/borgbackup/borg/issues/577","number":577,"state":"open","locked":false,"title":"Fix upgrade without ~/attic/keys existing.","user":{"login":"Profpatsch","id":3153638,"avatar_url":"https://avatars.githubusercontent.com/u/3153638?v=3","gravatar_id":"","url":"https://api.github.com/users/Profpatsch","html_url":"https://github.com/Profpatsch","followers_url":"https://api.github.com/users/Profpatsch/followers","following_url":"https://api.github.com/users/Profpatsch/following{/other_user}","gists_url":"https://api.github.com/users/Profpatsch/gists{/gist_id}","starred_url":"https://api.github.com/users/Profpatsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Profpatsch/subscriptions","organizations_url":"https://api.github.com/users/Profpatsch/orgs","repos_url":"https://api.github.com/users/Profpatsch/repos","events_url":"https://api.github.com/users/Profpatsch/events{/privacy}","received_events_url":"https://api.github.com/users/Profpatsch/received_events","type":"User","site_admin":false},"body":"fixes #576 \r\n\r\nMaybe a different error should be output? atm it’s:\r\n    no key file found for repository\r\n\r\nMaybe something like:\r\n\r\n    No key folder found, assuming no keys exist\r\n\r\nOr even an error, prompting for folder generation? Although that might be a bit much.","created_at":"2016-01-18T17:16:10Z","updated_at":"2016-01-18T17:19:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"35093c2726aea64bd1e198eb6c6079be5f7a9531","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/borgbackup/borg/pulls/577/commits","review_comments_url":"https://api.github.com/repos/borgbackup/borg/pulls/577/comments","review_comment_url":"https://api.github.com/repos/borgbackup/borg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/borgbackup/borg/issues/577/comments","statuses_url":"https://api.github.com/repos/borgbackup/borg/statuses/9c5d4c23442b0ea45ecda8b7b44136c725d16326","head":{"label":"Profpatsch:master","ref":"master","sha":"9c5d4c23442b0ea45ecda8b7b44136c725d16326","user":{"login":"Profpatsch","id":3153638,"avatar_url":"https://avatars.githubusercontent.com/u/3153638?v=3","gravatar_id":"","url":"https://api.github.com/users/Profpatsch","html_url":"https://github.com/Profpatsch","followers_url":"https://api.github.com/users/Profpatsch/followers","following_url":"https://api.github.com/users/Profpatsch/following{/other_user}","gists_url":"https://api.github.com/users/Profpatsch/gists{/gist_id}","starred_url":"https://api.github.com/users/Profpatsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Profpatsch/subscriptions","organizations_url":"https://api.github.com/users/Profpatsch/orgs","repos_url":"https://api.github.com/users/Profpatsch/repos","events_url":"https://api.github.com/users/Profpatsch/events{/privacy}","received_events_url":"https://api.github.com/users/Profpatsch/received_events","type":"User","site_admin":false},"repo":{"id":49889673,"name":"borg","full_name":"Profpatsch/borg","owner":{"login":"Profpatsch","id":3153638,"avatar_url":"https://avatars.githubusercontent.com/u/3153638?v=3","gravatar_id":"","url":"https://api.github.com/users/Profpatsch","html_url":"https://github.com/Profpatsch","followers_url":"https://api.github.com/users/Profpatsch/followers","following_url":"https://api.github.com/users/Profpatsch/following{/other_user}","gists_url":"https://api.github.com/users/Profpatsch/gists{/gist_id}","starred_url":"https://api.github.com/users/Profpatsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Profpatsch/subscriptions","organizations_url":"https://api.github.com/users/Profpatsch/orgs","repos_url":"https://api.github.com/users/Profpatsch/repos","events_url":"https://api.github.com/users/Profpatsch/events{/privacy}","received_events_url":"https://api.github.com/users/Profpatsch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Profpatsch/borg","description":"Deduplicating backup program with compression and authenticated encryption.","fork":true,"url":"https://api.github.com/repos/Profpatsch/borg","forks_url":"https://api.github.com/repos/Profpatsch/borg/forks","keys_url":"https://api.github.com/repos/Profpatsch/borg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Profpatsch/borg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Profpatsch/borg/teams","hooks_url":"https://api.github.com/repos/Profpatsch/borg/hooks","issue_events_url":"https://api.github.com/repos/Profpatsch/borg/issues/events{/number}","events_url":"https://api.github.com/repos/Profpatsch/borg/events","assignees_url":"https://api.github.com/repos/Profpatsch/borg/assignees{/user}","branches_url":"https://api.github.com/repos/Profpatsch/borg/branches{/branch}","tags_url":"https://api.github.com/repos/Profpatsch/borg/tags","blobs_url":"https://api.github.com/repos/Profpatsch/borg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Profpatsch/borg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Profpatsch/borg/git/refs{/sha}","trees_url":"https://api.github.com/repos/Profpatsch/borg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Profpatsch/borg/statuses/{sha}","languages_url":"https://api.github.com/repos/Profpatsch/borg/languages","stargazers_url":"https://api.github.com/repos/Profpatsch/borg/stargazers","contributors_url":"https://api.github.com/repos/Profpatsch/borg/contributors","subscribers_url":"https://api.github.com/repos/Profpatsch/borg/subscribers","subscription_url":"https://api.github.com/repos/Profpatsch/borg/subscription","commits_url":"https://api.github.com/repos/Profpatsch/borg/commits{/sha}","git_commits_url":"https://api.github.com/repos/Profpatsch/borg/git/commits{/sha}","comments_url":"https://api.github.com/repos/Profpatsch/borg/comments{/number}","issue_comment_url":"https://api.github.com/repos/Profpatsch/borg/issues/comments{/number}","contents_url":"https://api.github.com/repos/Profpatsch/borg/contents/{+path}","compare_url":"https://api.github.com/repos/Profpatsch/borg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Profpatsch/borg/merges","archive_url":"https://api.github.com/repos/Profpatsch/borg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Profpatsch/borg/downloads","issues_url":"https://api.github.com/repos/Profpatsch/borg/issues{/number}","pulls_url":"https://api.github.com/repos/Profpatsch/borg/pulls{/number}","milestones_url":"https://api.github.com/repos/Profpatsch/borg/milestones{/number}","notifications_url":"https://api.github.com/repos/Profpatsch/borg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Profpatsch/borg/labels{/name}","releases_url":"https://api.github.com/repos/Profpatsch/borg/releases{/id}","created_at":"2016-01-18T16:36:49Z","updated_at":"2016-01-18T16:36:50Z","pushed_at":"2016-01-18T17:14:44Z","git_url":"git://github.com/Profpatsch/borg.git","ssh_url":"git@github.com:Profpatsch/borg.git","clone_url":"https://github.com/Profpatsch/borg.git","svn_url":"https://github.com/Profpatsch/borg","homepage":"https://borgbackup.github.io/","size":2637,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"borgbackup:master","ref":"master","sha":"3b6fdbc57c71b84ed9d8f748148ed0a9e44c9557","user":{"login":"borgbackup","id":12418060,"avatar_url":"https://avatars.githubusercontent.com/u/12418060?v=3","gravatar_id":"","url":"https://api.github.com/users/borgbackup","html_url":"https://github.com/borgbackup","followers_url":"https://api.github.com/users/borgbackup/followers","following_url":"https://api.github.com/users/borgbackup/following{/other_user}","gists_url":"https://api.github.com/users/borgbackup/gists{/gist_id}","starred_url":"https://api.github.com/users/borgbackup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borgbackup/subscriptions","organizations_url":"https://api.github.com/users/borgbackup/orgs","repos_url":"https://api.github.com/users/borgbackup/repos","events_url":"https://api.github.com/users/borgbackup/events{/privacy}","received_events_url":"https://api.github.com/users/borgbackup/received_events","type":"Organization","site_admin":false},"repo":{"id":35517126,"name":"borg","full_name":"borgbackup/borg","owner":{"login":"borgbackup","id":12418060,"avatar_url":"https://avatars.githubusercontent.com/u/12418060?v=3","gravatar_id":"","url":"https://api.github.com/users/borgbackup","html_url":"https://github.com/borgbackup","followers_url":"https://api.github.com/users/borgbackup/followers","following_url":"https://api.github.com/users/borgbackup/following{/other_user}","gists_url":"https://api.github.com/users/borgbackup/gists{/gist_id}","starred_url":"https://api.github.com/users/borgbackup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borgbackup/subscriptions","organizations_url":"https://api.github.com/users/borgbackup/orgs","repos_url":"https://api.github.com/users/borgbackup/repos","events_url":"https://api.github.com/users/borgbackup/events{/privacy}","received_events_url":"https://api.github.com/users/borgbackup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/borgbackup/borg","description":"Deduplicating backup program with compression and authenticated encryption.","fork":false,"url":"https://api.github.com/repos/borgbackup/borg","forks_url":"https://api.github.com/repos/borgbackup/borg/forks","keys_url":"https://api.github.com/repos/borgbackup/borg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/borgbackup/borg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/borgbackup/borg/teams","hooks_url":"https://api.github.com/repos/borgbackup/borg/hooks","issue_events_url":"https://api.github.com/repos/borgbackup/borg/issues/events{/number}","events_url":"https://api.github.com/repos/borgbackup/borg/events","assignees_url":"https://api.github.com/repos/borgbackup/borg/assignees{/user}","branches_url":"https://api.github.com/repos/borgbackup/borg/branches{/branch}","tags_url":"https://api.github.com/repos/borgbackup/borg/tags","blobs_url":"https://api.github.com/repos/borgbackup/borg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/borgbackup/borg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/borgbackup/borg/git/refs{/sha}","trees_url":"https://api.github.com/repos/borgbackup/borg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/borgbackup/borg/statuses/{sha}","languages_url":"https://api.github.com/repos/borgbackup/borg/languages","stargazers_url":"https://api.github.com/repos/borgbackup/borg/stargazers","contributors_url":"https://api.github.com/repos/borgbackup/borg/contributors","subscribers_url":"https://api.github.com/repos/borgbackup/borg/subscribers","subscription_url":"https://api.github.com/repos/borgbackup/borg/subscription","commits_url":"https://api.github.com/repos/borgbackup/borg/commits{/sha}","git_commits_url":"https://api.github.com/repos/borgbackup/borg/git/commits{/sha}","comments_url":"https://api.github.com/repos/borgbackup/borg/comments{/number}","issue_comment_url":"https://api.github.com/repos/borgbackup/borg/issues/comments{/number}","contents_url":"https://api.github.com/repos/borgbackup/borg/contents/{+path}","compare_url":"https://api.github.com/repos/borgbackup/borg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/borgbackup/borg/merges","archive_url":"https://api.github.com/repos/borgbackup/borg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/borgbackup/borg/downloads","issues_url":"https://api.github.com/repos/borgbackup/borg/issues{/number}","pulls_url":"https://api.github.com/repos/borgbackup/borg/pulls{/number}","milestones_url":"https://api.github.com/repos/borgbackup/borg/milestones{/number}","notifications_url":"https://api.github.com/repos/borgbackup/borg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/borgbackup/borg/labels{/name}","releases_url":"https://api.github.com/repos/borgbackup/borg/releases{/id}","created_at":"2015-05-12T23:10:47Z","updated_at":"2016-01-18T12:43:53Z","pushed_at":"2016-01-18T17:16:10Z","git_url":"git://github.com/borgbackup/borg.git","ssh_url":"git@github.com:borgbackup/borg.git","clone_url":"https://github.com/borgbackup/borg.git","svn_url":"https://github.com/borgbackup/borg","homepage":"https://borgbackup.github.io/","size":3033,"stargazers_count":444,"watchers_count":444,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":54,"mirror_url":null,"open_issues_count":107,"forks":54,"open_issues":107,"watchers":444,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/577"},"html":{"href":"https://github.com/borgbackup/borg/pull/577"},"issue":{"href":"https://api.github.com/repos/borgbackup/borg/issues/577"},"comments":{"href":"https://api.github.com/repos/borgbackup/borg/issues/577/comments"},"review_comments":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/577/comments"},"review_comment":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/borgbackup/borg/pulls/577/commits"},"statuses":{"href":"https://api.github.com/repos/borgbackup/borg/statuses/9c5d4c23442b0ea45ecda8b7b44136c725d16326"}}}}