Skip to content

Commit

Permalink
Merge pull request #25 from pnlbwh/replace-tmp
Browse files Browse the repository at this point in the history
replace /tmp with gettempdir()
  • Loading branch information
tashrifbillah authored Jan 22, 2021
2 parents 1b57776 + 142becb commit febeb50
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/buildTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
eps= 2.2204e-16
SCRIPTDIR= dirname(__file__)
config = ConfigParser()
config.read(f'/tmp/harm_config_{getpid()}.ini')
config.read(pjoin(gettempdir(),f'harm_config_{getpid()}.ini'))
N_shm = int(config['DEFAULT']['N_shm'])
N_proc = int(config['DEFAULT']['N_proc'])
bshell_b = int(config['DEFAULT']['bshell_b'])
Expand Down
2 changes: 1 addition & 1 deletion lib/debug_fa.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
mniTmp = pjoin(ROOTDIR, 'IITAtlas', 'IITmean_FA.nii.gz')

config = ConfigParser()
config.read(f'/tmp/harm_config_{getpid()}.ini')
config.read(pjoin(gettempdir(),f'harm_config_{getpid()}.ini'))
N_proc = int(config['DEFAULT']['N_proc'])
diffusionMeasures = [x for x in config['DEFAULT']['diffusionMeasures'].split(',')]
bshell_b = int(config['DEFAULT']['bshell_b'])
Expand Down
2 changes: 1 addition & 1 deletion lib/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

SCRIPTDIR= dirname(__file__)
config = ConfigParser()
config.read(f'/tmp/harm_config_{getpid()}.ini')
config.read(pjoin(gettempdir(),f'harm_config_{getpid()}.ini'))

N_shm = int(config['DEFAULT']['N_shm'])
N_proc = int(config['DEFAULT']['N_proc'])
Expand Down
2 changes: 1 addition & 1 deletion lib/reconstSignal.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
eps= 2.2204e-16
SCRIPTDIR= dirname(__file__)
config = ConfigParser()
config.read(f'/tmp/harm_config_{getpid()}.ini')
config.read(pjoin(gettempdir(),f'harm_config_{getpid()}.ini'))
N_shm = int(config['DEFAULT']['N_shm'])
N_proc = int(config['DEFAULT']['N_proc'])
bshell_b = int(config['DEFAULT']['bshell_b'])
Expand Down
1 change: 1 addition & 0 deletions lib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from shutil import copyfile, rmtree
import numpy as np
import shutil, sys
from tempfile import gettempdir

SCRIPTDIR= abspath(dirname(__file__))

Expand Down

0 comments on commit febeb50

Please sign in to comment.