Skip to content

Commit 7e930b2

Browse files
authored
[zorg] Gently pass through the IRenderables in factory.pathRelativeTo static method. (#222)
We can get `IRenderable` (util.Interpolate) into `factory.pathRelativeTo()` from the builder configuration. We cannot process IRenderables here because of lack of required data. Just gently pass through that kind of arguments.
1 parent 1af79dd commit 7e930b2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

zorg/buildbot/process/factory.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from collections import OrderedDict
33

44
from buildbot.process.factory import BuildFactory
5+
from buildbot.interfaces import IRenderable
56
from buildbot.plugins import util, steps
67

78
_all_runtimes = frozenset([
@@ -108,6 +109,11 @@ def __repr__(self):
108109

109110
@staticmethod
110111
def pathRelativeTo(path, basePath):
112+
# We cannot process the IRenderables that time.
113+
# Just let them pass without changes.
114+
if IRenderable.providedBy(path) or IRenderable.providedBy(basePath):
115+
return path
116+
111117
if path.startswith('/'):
112118
# The path is absolute. Don't touch it.
113119
return path

0 commit comments

Comments
 (0)