mirror of
https://github.com/ankitects/anki.git
synced 2025-11-12 23:57:13 -05:00
Revert "tolerate a str arg to writeData()"
This reverts commit 2d4e88afbd.
On second thought, this change is likely to mask the error in most cases, and
we want add-on authors to update their add-ons anyway as they would not be
handling non-latin text in 2.0.12.
This commit is contained in:
parent
2d4e88afbd
commit
b42c0c725b
1 changed files with 0 additions and 4 deletions
|
|
@ -89,10 +89,6 @@ class MediaManager(object):
|
||||||
return self.writeData(opath, open(opath, "rb").read())
|
return self.writeData(opath, open(opath, "rb").read())
|
||||||
|
|
||||||
def writeData(self, opath, data):
|
def writeData(self, opath, data):
|
||||||
if not isinstance(opath, unicode):
|
|
||||||
# old code/addons were passing as str
|
|
||||||
print "writeData() should be called with unicode"
|
|
||||||
opath = unicode(opath, "utf8", "ignore")
|
|
||||||
# if fname is a full path, use only the basename
|
# if fname is a full path, use only the basename
|
||||||
fname = os.path.basename(opath)
|
fname = os.path.basename(opath)
|
||||||
# make sure we write it in NFC form (on mac will autoconvert to NFD),
|
# make sure we write it in NFC form (on mac will autoconvert to NFD),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue