From 176cad38768d7d8de4316d8c0382c88e6619bfd2 Mon Sep 17 00:00:00 2001 From: Rob Lemley Date: Thu, 23 Jan 2020 00:32:53 +0000 Subject: [PATCH] Bug 1611014 - Make sure Taskcluster root_dir is a unicode string. r=rstewart This fixes an issue when running "mach taskgraph" with the --root parameter from the commandline. We use this regularly when working on Thunderbird task configuration. The initial list of kind names is read with os.listdir(), which returns non-unicode strings when given a non-unicode string. As a result, some tasks fail to validate because there's a non-unicode string where a unicode string is expected. Differential Revision: https://phabricator.services.mozilla.com/D60775 --HG-- extra : moz-landing-system : lando --- taskcluster/taskgraph/generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/taskcluster/taskgraph/generator.py b/taskcluster/taskgraph/generator.py index d437aa32fe35..4439abe5cf82 100644 --- a/taskcluster/taskgraph/generator.py +++ b/taskcluster/taskgraph/generator.py @@ -7,7 +7,7 @@ import logging import os import copy import attr -from six import text_type +from six import text_type, ensure_text from . import filter_tasks from .graph import Graph @@ -115,7 +115,7 @@ class TaskGraphGenerator(object): """ if root_dir is None: root_dir = 'taskcluster/ci' - self.root_dir = root_dir + self.root_dir = ensure_text(root_dir) self._parameters = parameters self._target_kind = target_kind