summaryrefslogtreecommitdiffstats
path: root/comm/taskcluster/comm_taskgraph/util/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'comm/taskcluster/comm_taskgraph/util/__init__.py')
-rw-r--r--comm/taskcluster/comm_taskgraph/util/__init__.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/comm/taskcluster/comm_taskgraph/util/__init__.py b/comm/taskcluster/comm_taskgraph/util/__init__.py
new file mode 100644
index 0000000000..71f5dc9cd0
--- /dev/null
+++ b/comm/taskcluster/comm_taskgraph/util/__init__.py
@@ -0,0 +1,15 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+
+def strip_comm_prefix(relpath):
+ """
+ Returns relpath with 'comm/' prefix removed.
+ :param string relpath: relative path
+ :return string: stripped path
+ """
+ if relpath[:5] == "comm/":
+ return relpath[5:]
+ else:
+ return relpath