summaryrefslogtreecommitdiffstats
path: root/third_party/python/taskcluster_taskgraph/taskgraph/util/hash.py
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/python/taskcluster_taskgraph/taskgraph/util/hash.py')
-rw-r--r--third_party/python/taskcluster_taskgraph/taskgraph/util/hash.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/third_party/python/taskcluster_taskgraph/taskgraph/util/hash.py b/third_party/python/taskcluster_taskgraph/taskgraph/util/hash.py
index 5d884fc318..d42b2ecef9 100644
--- a/third_party/python/taskcluster_taskgraph/taskgraph/util/hash.py
+++ b/third_party/python/taskcluster_taskgraph/taskgraph/util/hash.py
@@ -39,10 +39,7 @@ def hash_paths(base_path, patterns):
raise Exception("%s did not match anything" % pattern)
for path in sorted(found):
h.update(
- "{} {}\n".format(
- hash_path(mozpath.abspath(mozpath.join(base_path, path))),
- mozpath.normsep(path),
- ).encode("utf-8")
+ f"{hash_path(mozpath.abspath(mozpath.join(base_path, path)))} {mozpath.normsep(path)}\n".encode()
)
return h.hexdigest()
@@ -55,4 +52,8 @@ def _find_matching_files(base_path, pattern):
@memoize
def _get_all_files(base_path):
- return [str(path) for path in Path(base_path).rglob("*") if path.is_file()]
+ return [
+ mozpath.normsep(str(path))
+ for path in Path(base_path).rglob("*")
+ if path.is_file()
+ ]