[kupfer: 5/5] plugin.google_translate: Fix error in string format
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer: 5/5] plugin.google_translate: Fix error in string format
- Date: Wed, 18 Nov 2009 14:17:55 +0000 (UTC)
commit f429144bfb4ea4d4ebf1c16fc940452b1895880a
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Wed Nov 18 15:13:57 2009 +0100
plugin.google_translate: Fix error in string format
kupfer/plugin/google_translate.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/kupfer/plugin/google_translate.py b/kupfer/plugin/google_translate.py
index 678ddff..a45e884 100644
--- a/kupfer/plugin/google_translate.py
+++ b/kupfer/plugin/google_translate.py
@@ -54,8 +54,8 @@ def _translate(text, lang):
conn.request("POST", _GOOGLE_TRANSLATE_PATH, query_param, _HEADER)
resp = conn.getresponse()
if resp.status != 200:
- raise ValueError('invalid response %d, %s' % resp.status,
- resp.reason)
+ raise ValueError('invalid response %d, %s' % (resp.status,
+ resp.reason))
response_data = resp.read()
encoding = _parse_encoding_header(resp)
@@ -98,8 +98,8 @@ def _load_languages():
conn.request("GET", _GOOGLE_TRANS_LANG_PATH, headers=headers)
resp = conn.getresponse()
if resp.status != 200:
- raise ValueError('invalid response %d, %s' % resp.status,
- resp.reason)
+ raise ValueError('invalid response %d, %s' % (resp.status,
+ resp.reason))
result = resp.read().decode(_parse_encoding_header(resp), "replace")
result = result[result.index('select name=tl'):]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]