Skip to content

Commit 5e4146c

Browse files
committed
Fixed a bytes/str issue in a patch library call.
- Legacy-Id: 16326
1 parent 9235083 commit 5e4146c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ietf/checks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright The IETF Trust 2015-2019, All Rights Reserved
12
import os
23
import patch
34
import sys
@@ -367,7 +368,7 @@ def maybe_patch_library(app_configs, **kwargs):
367368
patch_path = os.path.join(cwd, patch_file)
368369
patch_set = patch.fromfile(patch_path)
369370
if patch_set:
370-
if not patch_set.apply(root=library_path):
371+
if not patch_set.apply(root=library_path.encode('utf-8')):
371372
errors.append(checks.Warning(
372373
"Could not apply patch from file '%s'"%patch_file,
373374
hint=("Make sure that the patch file contains a unified diff and has valid file paths\n\n"

0 commit comments

Comments
 (0)