From d0d45c5e614adc914c6f55731b23d27929d64f19 Mon Sep 17 00:00:00 2001
From: "Stuart D. Gathman" <stuart@gathman.org>
Date: Mon, 12 Aug 2019 17:46:45 -0400
Subject: [PATCH] ZipFile.setpassword() takes bytes in python3

---
 testmime.py   | 2 +-
 testsample.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testmime.py b/testmime.py
index c2ff374..56c041b 100644
--- a/testmime.py
+++ b/testmime.py
@@ -54,7 +54,7 @@ class MimeTestCase(unittest.TestCase):
 
   def setUp(self):
     self.zf = zipfile.ZipFile('test/virus.zip','r')
-    self.zf.setpassword('denatured')
+    self.zf.setpassword(b'denatured')
 
   def tearDown(self):
     self.zf.close()
diff --git a/testsample.py b/testsample.py
index 8f43c71..d6f0256 100644
--- a/testsample.py
+++ b/testsample.py
@@ -15,7 +15,7 @@ class BMSMilterTestCase(unittest.TestCase):
 
   def setUp(self):
     self.zf = zipfile.ZipFile('test/virus.zip','r')
-    self.zf.setpassword('denatured')
+    self.zf.setpassword(b'denatured')
 
   def tearDown(self):
     self.zf.close()
-- 
GitLab