diff --git a/test/sanity/code-smell/package-data.py b/test/sanity/code-smell/package-data.py index 921cb1971fa..06f3f9165e0 100644 --- a/test/sanity/code-smell/package-data.py +++ b/test/sanity/code-smell/package-data.py @@ -223,8 +223,9 @@ def install_sdist(tmp_dir, sdist_dir): raise Exception('sdist install failed:\n%s' % stderr) # Determine the prefix for the installed files - match = re.search('^creating (%s/.*?/(?:site|dist)-packages)/ansible$' % + match = re.search('^copying .* -> (%s/.*?/(?:site|dist)-packages)/ansible$' % tmp_dir, stdout, flags=re.M) + return match.group(1)