Simplify logic to ensure absolute path
We can simplify the conditional logic to ensure a path is absolute, by
using os.path.join instead of string concatenation.
Change-Id: I3d2441bbb235fef4775d4bc481574d85866a7fb2
diff --git a/zuul/launcher/ansiblelaunchserver.py b/zuul/launcher/ansiblelaunchserver.py
index c3a5dfe..40bad52 100644
--- a/zuul/launcher/ansiblelaunchserver.py
+++ b/zuul/launcher/ansiblelaunchserver.py
@@ -582,9 +582,8 @@
# at least start by matching an immediate file or subdirectory
# (even if later we have a ** in the middle), so in this case,
# anchor it to the root of the transfer (the workspace).
- if ((not source.startswith('**')) and
- (not source.startswith('/'))):
- source = '/' + source
+ if not source.startswith('**'):
+ source = os.path.join('/', source)
# These options mean: include the thing we want, include any
# directories (so that we continue to search for the thing we
# want no matter how deep it is), exclude anything that