Skip to content

Commit 8036c6e

Browse files
natthan-pigouxfstagni
authored andcommitted
fix: use temp file name instead of namedTempFile
1 parent 4c7b46a commit 8036c6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DIRAC/FrameworkSystem/Utilities/diracx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ def diracxVerifyConfig(cfgData):
123123
os.environ["DIRAC_COMPAT_ENABLE_CS_CONVERSION"] = "true"
124124
with tempfile.NamedTemporaryFile() as temp_cfg:
125125
with tempfile.NamedTemporaryFile() as temp_diracx_cfg:
126-
cfgData.writeToFile(temp_cfg)
127-
cmd = ["dirac", "internal", "legacy", "cs-sync", temp_cfg, temp_diracx_cfg]
126+
cfgData.writeToFile(temp_cfg.name)
127+
cmd = ["dirac", "internal", "legacy", "cs-sync", temp_cfg.name, temp_diracx_cfg.name]
128128
res = subprocess.run(cmd, capture_output=True, text=True, timeout=15)
129129
os.environ.pop("DIRAC_COMPAT_ENABLE_CS_CONVERSION")
130130
if res.returncode == 0:

0 commit comments

Comments
 (0)