From 411b3b4e483448016b24c22ff5034a0d588cdee5 Mon Sep 17 00:00:00 2001 From: splunk-jessica Date: Tue, 28 Nov 2023 13:44:44 -0800 Subject: [PATCH] PAPP-32450 Vault path bug fix --- jira_connector.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jira_connector.py b/jira_connector.py index a16156c..2799100 100644 --- a/jira_connector.py +++ b/jira_connector.py @@ -31,6 +31,7 @@ from bs4 import BeautifulSoup, UnicodeDammit from dateutil.parser import parse from phantom.vault import Vault +from phantom_common import paths from jira.client import JIRA # THIS Connector imports @@ -1679,7 +1680,8 @@ def _handle_attachment(self, attachment, container_id, artifact_list, action_res if hasattr(Vault, 'get_vault_tmp_dir'): tmp = tempfile.NamedTemporaryFile(dir=Vault.get_vault_tmp_dir(), delete=False) else: - tmp = tempfile.NamedTemporaryFile(dir='/opt/phantom/vault/tmp/', delete=False) + local_dir = os.path.join(paths.PHANTOM_VAULT, "tmp") + tmp = tempfile.NamedTemporaryFile(dir=local_dir, delete=False) ret_val = self._download_file(attachment.content, tmp.name)