Skip to content

Commit 3db4872

Browse files
committed
Specified explicit UTF-8 decoding of submission checker output
- Legacy-Id: 17194
1 parent 722a608 commit 3db4872

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

ietf/submit/checkers.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright The IETF Trust 2016-2019, All Rights Reserved
1+
# Copyright The IETF Trust 2016-2020, All Rights Reserved
22
# -*- coding: utf-8 -*-
33

44

@@ -84,8 +84,8 @@ def check_file_txt(self, path):
8484

8585
cmd = "%s %s %s" % (settings.IDSUBMIT_IDNITS_BINARY, self.options, path)
8686
code, out, err = pipe(cmd)
87-
out = out.decode()
88-
err = err.decode()
87+
out = out.decode('utf-8')
88+
err = err.decode('utf-8')
8989
if code != 0 or out == "":
9090
message = "idnits error: %s:\n Error %s: %s" %( cmd, code, err)
9191
log(message)
@@ -214,8 +214,8 @@ def check_file_txt(self, path):
214214
cmd_version = VersionInfo.objects.get(command=command).version
215215
cmd = cmd_template.format(libs=modpath, model=path)
216216
code, out, err = pipe(cmd)
217-
out = out.decode()
218-
err = err.decode()
217+
out = out.decode('utf-8')
218+
err = err.decode('utf-8')
219219
if code > 0 or len(err.strip()) > 0 :
220220
error_lines = err.splitlines()
221221
assertion('len(error_lines) > 0')
@@ -247,8 +247,8 @@ def check_file_txt(self, path):
247247
cmd = cmd_template.format(model=path, rfclib=settings.SUBMIT_YANG_RFC_MODEL_DIR, tmplib=workdir,
248248
draftlib=settings.SUBMIT_YANG_DRAFT_MODEL_DIR, ianalib=settings.SUBMIT_YANG_IANA_MODEL_DIR, )
249249
code, out, err = pipe(cmd)
250-
out = out.decode()
251-
err = err.decode()
250+
out = out.decode('utf-8')
251+
err = err.decode('utf-8')
252252
if code > 0 or len(err.strip()) > 0:
253253
err_lines = err.splitlines()
254254
for line in err_lines:

0 commit comments

Comments
 (0)