From 1788cd2facd829c3ef9788e0cd998e889c583386 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 19 Jul 2012 17:41:52 +0900 Subject: [PATCH] as tmpfile() returns unicode now, shouldn't try to convert to unicode again --- aqt/editor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/aqt/editor.py b/aqt/editor.py index 76fc455aa..f037ad7b7 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -1051,8 +1051,7 @@ class EditorWebView(AnkiWebView): def _processImage(self, mime): im = QImage(mime.imageData()) - name = namedtmp("paste-%d" % im.cacheKey()) - uname = unicode(name, sys.getfilesystemencoding()) + uname = namedtmp("paste-%d" % im.cacheKey()) if self.editor.mw.pm.profile.get("pastePNG", False): ext = ".png" im.save(uname+ext, None, 50)