Package: pypandoc / 1.4+ds0-1.1

0002-Fix-parsing-of-unicode-paths-on-non-unicode-locales.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From 9d59e8362374dfc516cfc606d9ffd81b2f1ed5e1 Mon Sep 17 00:00:00 2001
From: Elena Grandi <valhalla-d@trueelena.org>
Date: Sat, 5 Nov 2016 13:50:56 +0100
Subject: Fix parsing of unicode paths on non-unicode locales

---
 pypandoc/__init__.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/pypandoc/__init__.py b/pypandoc/__init__.py
index abde4e3..6196d88 100644
--- a/pypandoc/__init__.py
+++ b/pypandoc/__init__.py
@@ -149,8 +149,7 @@ def _identify_path(source):
     try:
         path = os.path.exists(source)
     except UnicodeEncodeError:
-        source = source.encode('utf-8')
-        path = os.path.exists(source)
+        path = os.path.exists(source.encode('utf-8'))
     except:
         path  # still false