Blob Blame Raw
From f0196bad669f0a46a33f7fa2f5afb85d00204cf3 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Tue, 20 Dec 2016 10:15:38 +0100
Subject: [PATCH 3/3] Avoid calling zipfile.open(..., "rU")

Fixes: #33
---
 python/javapackages/common/manifest.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/python/javapackages/common/manifest.py b/python/javapackages/common/manifest.py
index 5830d80..9a27ff8 100644
--- a/python/javapackages/common/manifest.py
+++ b/python/javapackages/common/manifest.py
@@ -60,7 +60,7 @@ class Manifest(object):
             try:
                 jarfile = ZipFile(self._path)
                 if "META-INF/MANIFEST.MF" in jarfile.namelist():
-                    mf = jarfile.open("META-INF/MANIFEST.MF", "rU")
+                    mf = jarfile.open("META-INF/MANIFEST.MF", "r")
             except IOError:
                 pass
         if mf is None:
@@ -93,7 +93,7 @@ class Manifest(object):
 
     def _normalize_manifest(self):
         lines = []
-        manifest = self._manifest.split(u'\n')
+        manifest = self._manifest.splitlines()
         for line in manifest:
             if line.startswith(' '):
                 lines[-1] += line.strip()
-- 
2.9.3