mirror of
https://github.com/odoo/runbot.git
synced 2025-04-02 16:25:45 +07:00
[FIX] runbot_cla: avoid unicode errors when reading CLA files
This commit is contained in:
parent
5ef0b2ee6d
commit
0535f99616
@ -5,6 +5,7 @@ import logging
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
import openerp
|
import openerp
|
||||||
|
from openerp.tools import ustr
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -15,8 +16,7 @@ class runbot_build(openerp.models.Model):
|
|||||||
cla_glob = glob.glob(build.path("doc/cla/*/*.md"))
|
cla_glob = glob.glob(build.path("doc/cla/*/*.md"))
|
||||||
if cla_glob:
|
if cla_glob:
|
||||||
cla = ''.join(open(f).read() for f in cla_glob)
|
cla = ''.join(open(f).read() for f in cla_glob)
|
||||||
cla = cla.lower()
|
cla = ustr(cla.lower())
|
||||||
cla = cla.decode('utf-8')
|
|
||||||
mo = re.search('[^ <@]+@[^ @>]+', build.author_email or '')
|
mo = re.search('[^ <@]+@[^ @>]+', build.author_email or '')
|
||||||
state = "failure"
|
state = "failure"
|
||||||
if mo:
|
if mo:
|
||||||
|
Loading…
Reference in New Issue
Block a user