summaryrefslogtreecommitdiff
path: root/test/pacman/util.py
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2018-08-19 21:12:33 -0400
committerAndrew Gregory <andrew.gregory.8@gmail.com>2018-10-18 18:05:19 -0700
commitafb9c0140fd6949ede64cc1a304e9349772fca04 (patch)
tree6995c7eb8f090f5af64ae6219f872b42db2eb9d3 /test/pacman/util.py
parentffde85aadfe0e08fb710102d0a547335e9d1a200 (diff)
downloadpacman-afb9c0140fd6949ede64cc1a304e9349772fca04.tar.xz
Port pactest to python3
Use BytesIO instead of StringIO, and ensure that we unicode-encode data where needed.
Diffstat (limited to 'test/pacman/util.py')
-rw-r--r--test/pacman/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/pacman/util.py b/test/pacman/util.py
index 5fbe4c35..544bdd8d 100644
--- a/test/pacman/util.py
+++ b/test/pacman/util.py
@@ -152,7 +152,7 @@ def getmd5sum(filename):
def mkmd5sum(data):
checksum = hashlib.md5()
- checksum.update("%s\n" % data)
+ checksum.update(("%s\n" % data).encode('utf8'))
return checksum.hexdigest()