Skip to content
Snippets Groups Projects
Commit 6e9bc27e authored by dh00601's avatar dh00601
Browse files

fixed merge conflict

parents 8d441f49 f4fc7707
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ import subprocess ...@@ -19,7 +19,7 @@ import subprocess
import time import time
import types import types
import resource import resource
import psutil
from io import StringIO from io import StringIO
from typing import Union, Any from typing import Union, Any
...@@ -537,6 +537,9 @@ def remove_file(file: str, verbosity: int = 0) -> None: ...@@ -537,6 +537,9 @@ def remove_file(file: str, verbosity: int = 0) -> None:
) )
def get_username():
return psutil.Process().username()
def temp_dir(*args: str) -> str: def temp_dir(*args: str) -> str:
""" """
Function to create directory within the TMP directory of the file system Function to create directory within the TMP directory of the file system
...@@ -551,7 +554,8 @@ def temp_dir(*args: str) -> str: ...@@ -551,7 +554,8 @@ def temp_dir(*args: str) -> str:
""" """
tmp_dir = tempfile.gettempdir() tmp_dir = tempfile.gettempdir()
path = os.path.join(tmp_dir, "binary_c_python") username = get_username()
path = os.path.join(tmp_dir, "binary_c_python-{}".format(username))
# loop over the other paths if there are any: # loop over the other paths if there are any:
if args: if args:
...@@ -563,7 +567,6 @@ def temp_dir(*args: str) -> str: ...@@ -563,7 +567,6 @@ def temp_dir(*args: str) -> str:
return path return path
def create_hdf5(data_dir: str, name: str) -> None: def create_hdf5(data_dir: str, name: str) -> None:
""" """
Function to create an hdf5 file from the contents of a directory: Function to create an hdf5 file from the contents of a directory:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment