From 3a93c400a3f8e58a4d10ae743fbdbada216d8641 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 16 Sep 2020 22:28:13 +0200 Subject: ma pkgs.kalauerbot: init --- makefu/5pkgs/kalauerbot/translate.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 makefu/5pkgs/kalauerbot/translate.patch (limited to 'makefu/5pkgs/kalauerbot/translate.patch') diff --git a/makefu/5pkgs/kalauerbot/translate.patch b/makefu/5pkgs/kalauerbot/translate.patch new file mode 100644 index 000000000..6ff820726 --- /dev/null +++ b/makefu/5pkgs/kalauerbot/translate.patch @@ -0,0 +1,17 @@ +diff --git a/googletrans/client.py b/googletrans/client.py +index 89c2237..c203b44 100644 +--- a/googletrans/client.py ++++ b/googletrans/client.py +@@ -190,6 +190,13 @@ class Translator(object): + pass + if not PY3 and isinstance(pron, unicode) and isinstance(origin, str): # pragma: nocover + origin = origin.decode('utf-8') ++ ++ if pron is None: ++ try: ++ pron = data[0][2][2] ++ except: # pragma: nocover ++ pass ++ + if dest in EXCLUDES and pron == origin: + pron = translated -- cgit v1.2.3 [cgit] Unable to lock slot /tmp/cgit/f5100000.lock: No such file or directory (2)