Skip to content

Commit 849928b

Browse files
committed
updated to allow for setting xvfb_max_wait in config file. default set to 10 (sec)
1 parent eb69920 commit 849928b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

nipype/interfaces/base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -995,10 +995,9 @@ def run(self, **inputs):
995995
stdout=open(os.devnull),
996996
stderr=open(os.devnull))
997997
wait_step = 0.2
998-
max_wait = 10
999998
wait_time = 0
1000999
while xvfb_proc.poll() is not None:
1001-
if wait_time > max_wait: # raise Exception if past maximum wait time
1000+
if wait_time > config.get('execution', 'xvfb_max_wait'):
10021001
raise Exception('Error: Xvfb did not start')
10031002
time.sleep(wait_step) # give Xvfb time to start
10041003
wait_time += wait_step

nipype/utils/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
write_provenance = false
5252
parameterize_dirs = true
5353
poll_sleep_duration = 60
54+
xvfb_max_wait = 10
5455
5556
[check]
5657
interval = 1209600

0 commit comments

Comments
 (0)