From c29636eab5bcc8fe36790472caabba5e7f00f45c Mon Sep 17 00:00:00 2001 From: Jiri Podivin Date: Wed, 27 Jan 2021 17:36:36 +0100 Subject: [PATCH] One of the two nested calls of os.path.join was redundant. os.path.join can accept arbitrary number of path likes, nesting the calls is therefore unnecessary. Signed-off-by: Jiri Podivin Change-Id: I19010de832b2dd0b7f1b4940c9f770929d041053 --- validations_libs/ansible.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/validations_libs/ansible.py b/validations_libs/ansible.py index 926c6a03..6ca79432 100644 --- a/validations_libs/ansible.py +++ b/validations_libs/ansible.py @@ -82,13 +82,10 @@ class Ansible(object): temp_suffix='validations-libs-ansible'): """Creates ansible fact dir""" ansible_fact_path = os.path.join( - os.path.join( tempfile.gettempdir(), - temp_suffix - ), - 'fact_cache' - ) - + temp_suffix, + 'fact_cache' + ) try: os.makedirs(ansible_fact_path) return ansible_fact_path