1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

rstrip modules path, to prevent some strange scenario with .git

This commit is contained in:
Matt Martz 2015-05-18 15:31:27 -05:00 committed by John Barker
parent 46670598aa
commit 074e4ad47f

View file

@ -249,6 +249,8 @@ def main():
action='store_true') action='store_true')
args = parser.parse_args() args = parser.parse_args()
args.modules = args.modules.rstrip('/')
for root, dirs, files in os.walk(args.modules): for root, dirs, files in os.walk(args.modules):
basedir = root[len(args.modules)+1:].split('/', 1)[0] basedir = root[len(args.modules)+1:].split('/', 1)[0]
if basedir in BLACKLIST_DIRS: if basedir in BLACKLIST_DIRS: