|
1 | | -# Copyright The IETF Trust 2016-2019, All Rights Reserved |
| 1 | +# Copyright The IETF Trust 2016-2020, All Rights Reserved |
2 | 2 | # -*- coding: utf-8 -*- |
3 | 3 |
|
4 | 4 |
|
@@ -84,8 +84,8 @@ def check_file_txt(self, path): |
84 | 84 |
|
85 | 85 | cmd = "%s %s %s" % (settings.IDSUBMIT_IDNITS_BINARY, self.options, path) |
86 | 86 | 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') |
89 | 89 | if code != 0 or out == "": |
90 | 90 | message = "idnits error: %s:\n Error %s: %s" %( cmd, code, err) |
91 | 91 | log(message) |
@@ -214,8 +214,8 @@ def check_file_txt(self, path): |
214 | 214 | cmd_version = VersionInfo.objects.get(command=command).version |
215 | 215 | cmd = cmd_template.format(libs=modpath, model=path) |
216 | 216 | 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') |
219 | 219 | if code > 0 or len(err.strip()) > 0 : |
220 | 220 | error_lines = err.splitlines() |
221 | 221 | assertion('len(error_lines) > 0') |
@@ -247,8 +247,8 @@ def check_file_txt(self, path): |
247 | 247 | cmd = cmd_template.format(model=path, rfclib=settings.SUBMIT_YANG_RFC_MODEL_DIR, tmplib=workdir, |
248 | 248 | draftlib=settings.SUBMIT_YANG_DRAFT_MODEL_DIR, ianalib=settings.SUBMIT_YANG_IANA_MODEL_DIR, ) |
249 | 249 | 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') |
252 | 252 | if code > 0 or len(err.strip()) > 0: |
253 | 253 | err_lines = err.splitlines() |
254 | 254 | for line in err_lines: |
|
0 commit comments