From 1d2999321bd5fd204905b86936fb3dc13b07d574 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sun, 8 Nov 2015 03:51:51 +0100 Subject: [PATCH] Fixed Python3-compatibility error in multipart code. --- wrw/form.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wrw/form.py b/wrw/form.py index 53fc82d..7f4930d 100644 --- a/wrw/form.py +++ b/wrw/form.py @@ -50,7 +50,7 @@ class formpart(object): break while len(self.form.buf) <= len(lboundary): ret = req.input.read(8192) - if ret == "": + if ret == b"": raise badmultipart("Missing last multipart boundary") self.form.buf += ret @@ -61,7 +61,7 @@ class formpart(object): self.buf = self.buf[limit:] else: ret = self.buf - self.buf = "" + self.buf = b"" return ret def readline(self, limit=-1): @@ -71,7 +71,7 @@ class formpart(object): if p < 0: if self.eof: ret = self.buf - self.buf = "" + self.buf = b"" return ret last = len(self.buf) self.fillbuf(last + 128) -- 2.11.0