summaryrefslogtreecommitdiff
path: root/patchtracker
diff options
context:
space:
mode:
Diffstat (limited to 'patchtracker')
-rw-r--r--patchtracker/Patch.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/patchtracker/Patch.py b/patchtracker/Patch.py
index 670f389..16bcaa6 100644
--- a/patchtracker/Patch.py
+++ b/patchtracker/Patch.py
@@ -26,7 +26,11 @@ class Diffstat:
class Patch:
def __init__(self, fh, level=1):
- self.p = fh.readlines()
+ lines = fh.readlines()
+ try:
+ self.p = unicode(lines)
+ except UnicodeDecodeError:
+ self.p = unicode(lines, 'latin-1')
self.lvl = level
def __str__(self):