MCPcopy Index your code
hub / github.com/PokemonGoF/PokemonGo-Bot / download

Method download

pokemongo_bot/plugin_loader.py:137–149  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers 1

installMethod · 0.95

Calls 3

get_local_destinationMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected