summaryrefslogtreecommitdiffstats
path: root/comm/taskcluster/comm_taskgraph/util/__init__.py
blob: 71f5dc9cd0221a8929aea53b454ebd1f8a433793 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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