mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-10-28 15:59:04 +00:00
Writing to files is 'wb' not 'rb'.
This commit is contained in:
1 parent
af58e45e14
commit
fc0b90582d
1 file changed
+1
-1
+1
-1
@@ -99,7 +99,7 @@ class Attachment:
|
|||||||
|
|
||||||
data = yield from self._http.get_attachment(self.url)
|
data = yield from self._http.get_attachment(self.url)
|
||||||
if isinstance(fp, str):
|
if isinstance(fp, str):
|
||||||
with open(fp, 'rb') as f:
|
with open(fp, 'wb') as f:
|
||||||
return f.write(data)
|
return f.write(data)
|
||||||
else:
|
else:
|
||||||
return fp.write(data)
|
return fp.write(data)
|
||||||
|
|||||||
Reference in new issue
Block a user