(self)
| 135 | os.remove(self.get_local_destination()) |
| 136 | |
| 137 | def download(self): |
| 138 | url = self.get_github_download_url() |
| 139 | dest = self.get_local_destination() |
| 140 | |
| 141 | r = requests.get(url, stream=True) |
| 142 | r.raise_for_status() |
| 143 | |
| 144 | with open(dest, 'wb') as f: |
| 145 | for chunk in r.iter_content(chunk_size=1024): |
| 146 | if chunk: |
| 147 | f.write(chunk) |
| 148 | r.close() |
| 149 | return dest |
no test coverage detected