File: 0001-Fix-bug-where-encoding-for-default-locale-is-None.patch

package info (click to toggle)
python-dendropy 4.2.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 68,392 kB
  • ctags: 3,947
  • sloc: python: 41,840; xml: 1,400; makefile: 15
file content (21 lines) | stat: -rw-r--r-- 655 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From c9c1c097f201f2ab2962ac450938c430b3d3dd2f Mon Sep 17 00:00:00 2001
From: Vachaspati <vachasp2@taubh1.campuscluster.illinois.edu>
Date: Fri, 19 Jun 2015 06:03:16 -0500
Subject: [PATCH] Fix bug where encoding for default locale is None.

---
 dendropy/utility/textprocessing.py | 3 +++
 1 file changed, 3 insertions(+)

--- a/dendropy/utility/textprocessing.py
+++ b/dendropy/utility/textprocessing.py
@@ -42,6 +42,9 @@ ENCODING = locale.getdefaultlocale()[1]
 if ENCODING == None:
     ENCODING = 'UTF-8'
 
+if ENCODING == None:
+    ENCODING = 'UTF-8'
+
 def bytes_to_text(s):
     """
     Converts a byte string (as read from, e.g., standard input)