We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ba3172 commit eb69920Copy full SHA for eb69920
nipype/interfaces/base.py
@@ -994,9 +994,14 @@ def run(self, **inputs):
994
xvfb_proc = subprocess.Popen(xvfb_cmd,
995
stdout=open(os.devnull),
996
stderr=open(os.devnull))
997
- time.sleep(0.2) # give Xvfb time to start
998
- if xvfb_proc.poll() is not None:
999
- raise Exception('Error: Xvfb did not start')
+ wait_step = 0.2
+ max_wait = 10
+ wait_time = 0
1000
+ while xvfb_proc.poll() is not None:
1001
+ if wait_time > max_wait: # raise Exception if past maximum wait time
1002
+ raise Exception('Error: Xvfb did not start')
1003
+ time.sleep(wait_step) # give Xvfb time to start
1004
+ wait_time += wait_step
1005
1006
runtime.environ['DISPLAY'] = ':%s' % vdisplay_num
1007
0 commit comments