don't hardcode tmp dir location
This commit is contained in:
parent
15d458d5fa
commit
c9264d6911
@ -12,6 +12,7 @@ import os
|
|||||||
import fnmatch
|
import fnmatch
|
||||||
import random
|
import random
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import tempfile
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
||||||
@ -85,7 +86,7 @@ class Xvfb:
|
|||||||
return display_num
|
return display_num
|
||||||
|
|
||||||
def _lock_files(self):
|
def _lock_files(self):
|
||||||
tmpdir = '/tmp'
|
tmpdir = tempfile.gettempdir()
|
||||||
pattern = '.X*-lock'
|
pattern = '.X*-lock'
|
||||||
names = fnmatch.filter(os.listdir(tmpdir), pattern)
|
names = fnmatch.filter(os.listdir(tmpdir), pattern)
|
||||||
ls = [os.path.join(tmpdir, child) for child in names]
|
ls = [os.path.join(tmpdir, child) for child in names]
|
||||||
|
Loading…
Reference in New Issue
Block a user