{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/mozregression/pulls/comments/47572000","id":47572000,"diff_hunk":"@@ -234,7 +234,7 @@ def __init__(self, destdir, session=requests, persist_limit=None):\n     def get_dest(self, fname):\n         return os.path.join(self.destdir, fname)\n \n-    def cancel(self, cancel_if=None):\n+    def cancel(self, cancel_if=None, wait=False):","path":"mozregression/download_manager.py","position":5,"original_position":5,"commit_id":"1b5b7721f9ce74f6588e7d62aa56e344e0ff0080","original_commit_id":"1b5b7721f9ce74f6588e7d62aa56e344e0ff0080","user":{"login":"parkouss","id":7723923,"avatar_url":"https://avatars.githubusercontent.com/u/7723923?v=3","gravatar_id":"","url":"https://api.github.com/users/parkouss","html_url":"https://github.com/parkouss","followers_url":"https://api.github.com/users/parkouss/followers","following_url":"https://api.github.com/users/parkouss/following{/other_user}","gists_url":"https://api.github.com/users/parkouss/gists{/gist_id}","starred_url":"https://api.github.com/users/parkouss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parkouss/subscriptions","organizations_url":"https://api.github.com/users/parkouss/orgs","repos_url":"https://api.github.com/users/parkouss/repos","events_url":"https://api.github.com/users/parkouss/events{/privacy}","received_events_url":"https://api.github.com/users/parkouss/received_events","type":"User","site_admin":false},"body":"Because this may block (in case the network is busy or something), and it is used in the gui, https://github.com/mozilla/mozregression/blob/91dc13a55125eb72db810f3eca4ededcc6b8f5ab/gui/mozregui/build_runner.py#L166\r\n\r\nI don't want the GUI to be blocking. It works in the gui because we wait (after the mainwindow is closed) for thread completion, then we remove the folder if required, https://github.com/mozilla/mozregression/blob/master/gui/mozregui/main.py#L148-L150. this is synchronized and blocking - but done when no window is shown so the user usually don't notice it.\r\n\r\nMaybe I can let this function as it was, and just use the new wait() call in the commandline main.py file - this can be a bit more readable.\r\n\r\n@wlach thoughts or suggestions ?","created_at":"2015-12-14T22:54:04Z","updated_at":"2015-12-14T22:54:04Z","html_url":"https://github.com/mozilla/mozregression/pull/367#discussion_r47572000","pull_request_url":"https://api.github.com/repos/mozilla/mozregression/pulls/367","_links":{"self":{"href":"https://api.github.com/repos/mozilla/mozregression/pulls/comments/47572000"},"html":{"href":"https://github.com/mozilla/mozregression/pull/367#discussion_r47572000"},"pull_request":{"href":"https://api.github.com/repos/mozilla/mozregression/pulls/367"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/mozregression/pulls/367","id":53343750,"html_url":"https://github.com/mozilla/mozregression/pull/367","diff_url":"https://github.com/mozilla/mozregression/pull/367.diff","patch_url":"https://github.com/mozilla/mozregression/pull/367.patch","issue_url":"https://api.github.com/repos/mozilla/mozregression/issues/367","number":367,"state":"open","locked":false,"title":"Bug 1231745 - fix race condition when removing dl dir","user":{"login":"parkouss","id":7723923,"avatar_url":"https://avatars.githubusercontent.com/u/7723923?v=3","gravatar_id":"","url":"https://api.github.com/users/parkouss","html_url":"https://github.com/parkouss","followers_url":"https://api.github.com/users/parkouss/followers","following_url":"https://api.github.com/users/parkouss/following{/other_user}","gists_url":"https://api.github.com/users/parkouss/gists{/gist_id}","starred_url":"https://api.github.com/users/parkouss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parkouss/subscriptions","organizations_url":"https://api.github.com/users/parkouss/orgs","repos_url":"https://api.github.com/users/parkouss/repos","events_url":"https://api.github.com/users/parkouss/events{/privacy}","received_events_url":"https://api.github.com/users/parkouss/received_events","type":"User","site_admin":false},"body":"Ensure that we don't have a race condition when the download_dir is\r\nremoved by first waiting for download threads to be finished.","created_at":"2015-12-11T01:42:46Z","updated_at":"2015-12-14T22:54:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"634c5d8907fd0f0598a2d003f7fcd0820eda8e13","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/mozregression/pulls/367/commits","review_comments_url":"https://api.github.com/repos/mozilla/mozregression/pulls/367/comments","review_comment_url":"https://api.github.com/repos/mozilla/mozregression/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/mozregression/issues/367/comments","statuses_url":"https://api.github.com/repos/mozilla/mozregression/statuses/1b5b7721f9ce74f6588e7d62aa56e344e0ff0080","head":{"label":"parkouss:master","ref":"master","sha":"1b5b7721f9ce74f6588e7d62aa56e344e0ff0080","user":{"login":"parkouss","id":7723923,"avatar_url":"https://avatars.githubusercontent.com/u/7723923?v=3","gravatar_id":"","url":"https://api.github.com/users/parkouss","html_url":"https://github.com/parkouss","followers_url":"https://api.github.com/users/parkouss/followers","following_url":"https://api.github.com/users/parkouss/following{/other_user}","gists_url":"https://api.github.com/users/parkouss/gists{/gist_id}","starred_url":"https://api.github.com/users/parkouss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parkouss/subscriptions","organizations_url":"https://api.github.com/users/parkouss/orgs","repos_url":"https://api.github.com/users/parkouss/repos","events_url":"https://api.github.com/users/parkouss/events{/privacy}","received_events_url":"https://api.github.com/users/parkouss/received_events","type":"User","site_admin":false},"repo":{"id":20301061,"name":"mozregression","full_name":"parkouss/mozregression","owner":{"login":"parkouss","id":7723923,"avatar_url":"https://avatars.githubusercontent.com/u/7723923?v=3","gravatar_id":"","url":"https://api.github.com/users/parkouss","html_url":"https://github.com/parkouss","followers_url":"https://api.github.com/users/parkouss/followers","following_url":"https://api.github.com/users/parkouss/following{/other_user}","gists_url":"https://api.github.com/users/parkouss/gists{/gist_id}","starred_url":"https://api.github.com/users/parkouss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parkouss/subscriptions","organizations_url":"https://api.github.com/users/parkouss/orgs","repos_url":"https://api.github.com/users/parkouss/repos","events_url":"https://api.github.com/users/parkouss/events{/privacy}","received_events_url":"https://api.github.com/users/parkouss/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/parkouss/mozregression","description":"Regression range finder for Mozilla nightly builds","fork":true,"url":"https://api.github.com/repos/parkouss/mozregression","forks_url":"https://api.github.com/repos/parkouss/mozregression/forks","keys_url":"https://api.github.com/repos/parkouss/mozregression/keys{/key_id}","collaborators_url":"https://api.github.com/repos/parkouss/mozregression/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/parkouss/mozregression/teams","hooks_url":"https://api.github.com/repos/parkouss/mozregression/hooks","issue_events_url":"https://api.github.com/repos/parkouss/mozregression/issues/events{/number}","events_url":"https://api.github.com/repos/parkouss/mozregression/events","assignees_url":"https://api.github.com/repos/parkouss/mozregression/assignees{/user}","branches_url":"https://api.github.com/repos/parkouss/mozregression/branches{/branch}","tags_url":"https://api.github.com/repos/parkouss/mozregression/tags","blobs_url":"https://api.github.com/repos/parkouss/mozregression/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/parkouss/mozregression/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/parkouss/mozregression/git/refs{/sha}","trees_url":"https://api.github.com/repos/parkouss/mozregression/git/trees{/sha}","statuses_url":"https://api.github.com/repos/parkouss/mozregression/statuses/{sha}","languages_url":"https://api.github.com/repos/parkouss/mozregression/languages","stargazers_url":"https://api.github.com/repos/parkouss/mozregression/stargazers","contributors_url":"https://api.github.com/repos/parkouss/mozregression/contributors","subscribers_url":"https://api.github.com/repos/parkouss/mozregression/subscribers","subscription_url":"https://api.github.com/repos/parkouss/mozregression/subscription","commits_url":"https://api.github.com/repos/parkouss/mozregression/commits{/sha}","git_commits_url":"https://api.github.com/repos/parkouss/mozregression/git/commits{/sha}","comments_url":"https://api.github.com/repos/parkouss/mozregression/comments{/number}","issue_comment_url":"https://api.github.com/repos/parkouss/mozregression/issues/comments{/number}","contents_url":"https://api.github.com/repos/parkouss/mozregression/contents/{+path}","compare_url":"https://api.github.com/repos/parkouss/mozregression/compare/{base}...{head}","merges_url":"https://api.github.com/repos/parkouss/mozregression/merges","archive_url":"https://api.github.com/repos/parkouss/mozregression/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/parkouss/mozregression/downloads","issues_url":"https://api.github.com/repos/parkouss/mozregression/issues{/number}","pulls_url":"https://api.github.com/repos/parkouss/mozregression/pulls{/number}","milestones_url":"https://api.github.com/repos/parkouss/mozregression/milestones{/number}","notifications_url":"https://api.github.com/repos/parkouss/mozregression/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/parkouss/mozregression/labels{/name}","releases_url":"https://api.github.com/repos/parkouss/mozregression/releases{/id}","created_at":"2014-05-29T16:53:07Z","updated_at":"2015-05-04T06:08:28Z","pushed_at":"2015-12-14T12:50:38Z","git_url":"git://github.com/parkouss/mozregression.git","ssh_url":"git@github.com:parkouss/mozregression.git","clone_url":"https://github.com/parkouss/mozregression.git","svn_url":"https://github.com/parkouss/mozregression","homepage":"http://mozilla.github.com/mozregression","size":1745,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"a28b56d1e03dae1fa01d633e0f54647b867858e3","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":512679,"name":"mozregression","full_name":"mozilla/mozregression","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/mozregression","description":"Regression range finder for Mozilla nightly builds","fork":false,"url":"https://api.github.com/repos/mozilla/mozregression","forks_url":"https://api.github.com/repos/mozilla/mozregression/forks","keys_url":"https://api.github.com/repos/mozilla/mozregression/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/mozregression/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/mozregression/teams","hooks_url":"https://api.github.com/repos/mozilla/mozregression/hooks","issue_events_url":"https://api.github.com/repos/mozilla/mozregression/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/mozregression/events","assignees_url":"https://api.github.com/repos/mozilla/mozregression/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/mozregression/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/mozregression/tags","blobs_url":"https://api.github.com/repos/mozilla/mozregression/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/mozregression/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/mozregression/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/mozregression/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/mozregression/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/mozregression/languages","stargazers_url":"https://api.github.com/repos/mozilla/mozregression/stargazers","contributors_url":"https://api.github.com/repos/mozilla/mozregression/contributors","subscribers_url":"https://api.github.com/repos/mozilla/mozregression/subscribers","subscription_url":"https://api.github.com/repos/mozilla/mozregression/subscription","commits_url":"https://api.github.com/repos/mozilla/mozregression/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/mozregression/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/mozregression/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/mozregression/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/mozregression/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/mozregression/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/mozregression/merges","archive_url":"https://api.github.com/repos/mozilla/mozregression/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/mozregression/downloads","issues_url":"https://api.github.com/repos/mozilla/mozregression/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/mozregression/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/mozregression/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/mozregression/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/mozregression/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/mozregression/releases{/id}","created_at":"2010-02-11T05:49:14Z","updated_at":"2015-11-23T05:59:29Z","pushed_at":"2015-12-14T15:01:11Z","git_url":"git://github.com/mozilla/mozregression.git","ssh_url":"git@github.com:mozilla/mozregression.git","clone_url":"https://github.com/mozilla/mozregression.git","svn_url":"https://github.com/mozilla/mozregression","homepage":"http://mozilla.github.com/mozregression","size":1923,"stargazers_count":62,"watchers_count":62,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":54,"mirror_url":null,"open_issues_count":4,"forks":54,"open_issues":4,"watchers":62,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/mozregression/pulls/367"},"html":{"href":"https://github.com/mozilla/mozregression/pull/367"},"issue":{"href":"https://api.github.com/repos/mozilla/mozregression/issues/367"},"comments":{"href":"https://api.github.com/repos/mozilla/mozregression/issues/367/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/mozregression/pulls/367/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/mozregression/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/mozregression/pulls/367/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/mozregression/statuses/1b5b7721f9ce74f6588e7d62aa56e344e0ff0080"}}}}