[FIX] pad: pad content encoding

Avoid error during pad creation

TypeError: cannot use a string pattern on a bytes-like object
This commit is contained in:
Martin Trigaux
2017-10-02 13:34:51 +02:00
parent e1b0e33830
commit 446971925e
+1 -1
View File
@@ -85,7 +85,7 @@ class PadCommon(models.AbstractModel):
except:
_logger.warning("No url found '%s'.", url)
else:
mo = re.search('<body>(.*)</body>', r.content, re.DOTALL)
mo = re.search('<body>(.*)</body>', r.content.decode(), re.DOTALL)
if mo:
content = mo.group(1)