{"action":"created","issue":{"url":"https://api.github.com/repos/maphew/apt/issues/26","labels_url":"https://api.github.com/repos/maphew/apt/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/maphew/apt/issues/26/comments","events_url":"https://api.github.com/repos/maphew/apt/issues/26/events","html_url":"https://github.com/maphew/apt/pull/26","id":60805177,"number":26,"title":"Updated error handling for do_download function","user":{"login":"amr66","id":10866105,"avatar_url":"https://avatars.githubusercontent.com/u/10866105?v=3","gravatar_id":"","url":"https://api.github.com/users/amr66","html_url":"https://github.com/amr66","followers_url":"https://api.github.com/users/amr66/followers","following_url":"https://api.github.com/users/amr66/following{/other_user}","gists_url":"https://api.github.com/users/amr66/gists{/gist_id}","starred_url":"https://api.github.com/users/amr66/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amr66/subscriptions","organizations_url":"https://api.github.com/users/amr66/orgs","repos_url":"https://api.github.com/users/amr66/repos","events_url":"https://api.github.com/users/amr66/events{/privacy}","received_events_url":"https://api.github.com/users/amr66/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-12T11:30:28Z","updated_at":"2015-03-17T10:19:49Z","closed_at":"2015-03-15T06:49:30Z","pull_request":{"url":"https://api.github.com/repos/maphew/apt/pulls/26","html_url":"https://github.com/maphew/apt/pull/26","diff_url":"https://github.com/maphew/apt/pull/26.diff","patch_url":"https://github.com/maphew/apt/pull/26.patch"},"body":"As discussed here: https://github.com/maphew/apt/issues/12\r\nThis is my approach..."},"comment":{"url":"https://api.github.com/repos/maphew/apt/issues/comments/82259328","html_url":"https://github.com/maphew/apt/pull/26#issuecomment-82259328","issue_url":"https://api.github.com/repos/maphew/apt/issues/26","id":82259328,"user":{"login":"amr66","id":10866105,"avatar_url":"https://avatars.githubusercontent.com/u/10866105?v=3","gravatar_id":"","url":"https://api.github.com/users/amr66","html_url":"https://github.com/amr66","followers_url":"https://api.github.com/users/amr66/followers","following_url":"https://api.github.com/users/amr66/following{/other_user}","gists_url":"https://api.github.com/users/amr66/gists{/gist_id}","starred_url":"https://api.github.com/users/amr66/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amr66/subscriptions","organizations_url":"https://api.github.com/users/amr66/orgs","repos_url":"https://api.github.com/users/amr66/repos","events_url":"https://api.github.com/users/amr66/events{/privacy}","received_events_url":"https://api.github.com/users/amr66/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T10:19:49Z","updated_at":"2015-03-17T10:19:49Z","body":"Congratulations, i took a short view yesterday. I've learned something new about raise as you use it to \"reraise\" an Error.\r\n\r\nI use apt.py as a module and wrote my own postinstall function to install osgeo4w packages. My \"own\" apt has a main function, similar to your global stuff. From there i set the needed variables, that are global in apt.py.\r\nJust a short sketch:\r\n````python\r\nimport apt\r\n# ...\r\napt.root = my_special_value\r\n# ...\r\ndef install(packages): # my very own install function\r\n    # ...\r\n    for p in required:\r\n        apt.do_download(p)\r\n        postinstall(p)  # my version of postinstall\r\n#... and so on\r\n````\r\nMaybe i create a git project for it?\r\nI had some problems downloading packages so my awareness increased on that function and a better handling. If a download fails, what is to do next? Retry? If you have multiple required packages and only some fail? Delete them?\r\nI will anotate in your code?\r\n"}}