From c0324363a6fe43a688af9b459a6a3aedfbd27483 Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Fri, 25 Mar 2011 08:52:40 +0000 Subject: [PATCH] Fix of encoding errormsg, specially for Windows. Rearranged the msg a little. svn: r16924 --- src/plugins/gramplet/Exif.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/gramplet/Exif.py b/src/plugins/gramplet/Exif.py index fcf83c47a..2a684c285 100644 --- a/src/plugins/gramplet/Exif.py +++ b/src/plugins/gramplet/Exif.py @@ -25,6 +25,7 @@ from gen.plug import Gramplet from gen.ggettext import gettext as _ import gtk import Utils +import sys # pyexiv2 download page (C) Olivier Tilloy _DOWNLOAD_LINK = "http://tilloy.net/dev/pyexiv2/download.html" @@ -52,10 +53,10 @@ except AttributeError: # the library is either not installed or does not meet # minimum required version for this addon.... if not pyexiv2_req_install: - raise Exception(_("The minimum required version for pyexiv2 must be %s \n" - "or greater. Or you do not have the python library installed yet. " + raise Exception((_("The minimum required version for pyexiv2 must be %s " + "or greater.\n Or you do not have the python library installed yet.\n" "You may download it from here: %s\n\n I recommend getting, %s") % ( - Min_VERSION_str, _DOWNLOAD_LINK, PrefVersion_str) ) + Min_VERSION_str, _DOWNLOAD_LINK, PrefVersion_str)).encode(sys.getfilesystemencoding()) ) class Exif(Gramplet): """