[gedit] Fix broken shell commands in snippets plugin.
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Fix broken shell commands in snippets plugin.
- Date: Thu, 29 Aug 2013 08:59:57 +0000 (UTC)
commit 9e164eb893bb69243bbe6ea6c45ec973e7596056
Author: Baptiste Mispelon <bmispelon gmail com>
Date: Thu Aug 29 10:51:44 2013 +0200
Fix broken shell commands in snippets plugin.
https://bugzilla.gnome.org/show_bug.cgi?id=707026
plugins/snippets/snippets/placeholder.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plugins/snippets/snippets/placeholder.py b/plugins/snippets/snippets/placeholder.py
index bc0a621..3693e87 100644
--- a/plugins/snippets/snippets/placeholder.py
+++ b/plugins/snippets/snippets/placeholder.py
@@ -437,9 +437,9 @@ class PlaceholderShell(PlaceholderExpand):
if len(line) > 0:
try:
- line = line
- except:
- line = line.encode(locale.getdefaultlocale()[1])
+ line = line.decode('utf-8')
+ except UnicodeDecodeError:
+ line = line.decode(locale.getdefaultlocale()[1], errors='replace')
self.shell_output += line
self.install_timeout()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]