{"action":"created","comment":{"url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/pulls/comments/32933293","id":32933293,"diff_hunk":"@@ -13,11 +16,28 @@ def download(self, local_dir='/tmp/', force=False):\n \n         self.download_manager.open(\n             'osmmftp.os.uk', self._username(), self._password())\n-        self.download_manager.ftp_client.cwd(self._source_dir())\n \n-        return self.download_manager.download_all_if_needed('./*_csv.zip',\n-                                                            local_dir,\n-                                                            force)\n+        try:\n+            self.ftp_client().cwd(self._source_dir())\n+            return self.download_manager.download_all_if_needed('./*_csv.zip',\n+                                                                local_dir,\n+                                                                force)\n+        except ftplib.error_perm:\n+            print 'FTP error - looking for local files'","path":"postcodeinfo/apps/postcode_api/downloaders/addressbase_basic_downloader.py","position":26,"original_position":26,"commit_id":"b74adafb708691f1136d20958244b774ee621c34","original_commit_id":"b74adafb708691f1136d20958244b774ee621c34","user":{"login":"andyhd","id":35194,"avatar_url":"https://avatars.githubusercontent.com/u/35194?v=3","gravatar_id":"","url":"https://api.github.com/users/andyhd","html_url":"https://github.com/andyhd","followers_url":"https://api.github.com/users/andyhd/followers","following_url":"https://api.github.com/users/andyhd/following{/other_user}","gists_url":"https://api.github.com/users/andyhd/gists{/gist_id}","starred_url":"https://api.github.com/users/andyhd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyhd/subscriptions","organizations_url":"https://api.github.com/users/andyhd/orgs","repos_url":"https://api.github.com/users/andyhd/repos","events_url":"https://api.github.com/users/andyhd/events{/privacy}","received_events_url":"https://api.github.com/users/andyhd/received_events","type":"User","site_admin":false},"body":"These print lines should be `logging.debug` or `logging.info` calls instead.","created_at":"2015-06-22T13:27:06Z","updated_at":"2015-06-22T13:27:06Z","html_url":"https://github.com/ministryofjustice/postcodeinfo/pull/50#discussion_r32933293","pull_request_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/pulls/50","_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/postcodeinfo/pulls/comments/32933293"},"html":{"href":"https://github.com/ministryofjustice/postcodeinfo/pull/50#discussion_r32933293"},"pull_request":{"href":"https://api.github.com/repos/ministryofjustice/postcodeinfo/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/pulls/50","id":37924268,"html_url":"https://github.com/ministryofjustice/postcodeinfo/pull/50","diff_url":"https://github.com/ministryofjustice/postcodeinfo/pull/50.diff","patch_url":"https://github.com/ministryofjustice/postcodeinfo/pull/50.patch","issue_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/issues/50","number":50,"state":"open","locked":false,"title":"Keep import files cached on s3 and local disk and allow import from there","user":{"login":"aldavidson","id":134501,"avatar_url":"https://avatars.githubusercontent.com/u/134501?v=3","gravatar_id":"","url":"https://api.github.com/users/aldavidson","html_url":"https://github.com/aldavidson","followers_url":"https://api.github.com/users/aldavidson/followers","following_url":"https://api.github.com/users/aldavidson/following{/other_user}","gists_url":"https://api.github.com/users/aldavidson/gists{/gist_id}","starred_url":"https://api.github.com/users/aldavidson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldavidson/subscriptions","organizations_url":"https://api.github.com/users/aldavidson/orgs","repos_url":"https://api.github.com/users/aldavidson/repos","events_url":"https://api.github.com/users/aldavidson/events{/privacy}","received_events_url":"https://api.github.com/users/aldavidson/received_events","type":"User","site_admin":false},"body":"so that we can still deploy a new system when Ordnance Survey have removed AddressBase from our FTP site, which they do 21 days after ordering (even though we won't get a new file until the next update - which might be another 2 months away)","created_at":"2015-06-17T17:09:22Z","updated_at":"2015-06-22T13:27:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"17be747b1ae43425830b95db0ffa59c7ac0fd89c","assignee":{"login":"andyhd","id":35194,"avatar_url":"https://avatars.githubusercontent.com/u/35194?v=3","gravatar_id":"","url":"https://api.github.com/users/andyhd","html_url":"https://github.com/andyhd","followers_url":"https://api.github.com/users/andyhd/followers","following_url":"https://api.github.com/users/andyhd/following{/other_user}","gists_url":"https://api.github.com/users/andyhd/gists{/gist_id}","starred_url":"https://api.github.com/users/andyhd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyhd/subscriptions","organizations_url":"https://api.github.com/users/andyhd/orgs","repos_url":"https://api.github.com/users/andyhd/repos","events_url":"https://api.github.com/users/andyhd/events{/privacy}","received_events_url":"https://api.github.com/users/andyhd/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/pulls/50/commits","review_comments_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/pulls/50/comments","review_comment_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/issues/50/comments","statuses_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/statuses/b74adafb708691f1136d20958244b774ee621c34","head":{"label":"ministryofjustice:keep-local-file-cache","ref":"keep-local-file-cache","sha":"b74adafb708691f1136d20958244b774ee621c34","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":34381577,"name":"postcodeinfo","full_name":"ministryofjustice/postcodeinfo","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/postcodeinfo","description":"REST API for looking up a given UK Postcode and getting addresses, lat/long, and local authority info","fork":false,"url":"https://api.github.com/repos/ministryofjustice/postcodeinfo","forks_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/forks","keys_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/events","assignees_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/merges","archive_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/releases{/id}","created_at":"2015-04-22T09:32:13Z","updated_at":"2015-05-14T12:17:34Z","pushed_at":"2015-06-22T13:12:04Z","git_url":"git://github.com/ministryofjustice/postcodeinfo.git","ssh_url":"git@github.com:ministryofjustice/postcodeinfo.git","clone_url":"https://github.com/ministryofjustice/postcodeinfo.git","svn_url":"https://github.com/ministryofjustice/postcodeinfo","homepage":"","size":932,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"ministryofjustice:master","ref":"master","sha":"4c74a4a42ec8d490d937ce8026eca3b1b31cef36","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":34381577,"name":"postcodeinfo","full_name":"ministryofjustice/postcodeinfo","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/postcodeinfo","description":"REST API for looking up a given UK Postcode and getting addresses, lat/long, and local authority info","fork":false,"url":"https://api.github.com/repos/ministryofjustice/postcodeinfo","forks_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/forks","keys_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/events","assignees_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/merges","archive_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/postcodeinfo/releases{/id}","created_at":"2015-04-22T09:32:13Z","updated_at":"2015-05-14T12:17:34Z","pushed_at":"2015-06-22T13:12:04Z","git_url":"git://github.com/ministryofjustice/postcodeinfo.git","ssh_url":"git@github.com:ministryofjustice/postcodeinfo.git","clone_url":"https://github.com/ministryofjustice/postcodeinfo.git","svn_url":"https://github.com/ministryofjustice/postcodeinfo","homepage":"","size":932,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/postcodeinfo/pulls/50"},"html":{"href":"https://github.com/ministryofjustice/postcodeinfo/pull/50"},"issue":{"href":"https://api.github.com/repos/ministryofjustice/postcodeinfo/issues/50"},"comments":{"href":"https://api.github.com/repos/ministryofjustice/postcodeinfo/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/ministryofjustice/postcodeinfo/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/ministryofjustice/postcodeinfo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ministryofjustice/postcodeinfo/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/ministryofjustice/postcodeinfo/statuses/b74adafb708691f1136d20958244b774ee621c34"}}}}