don't hardcode tmp dir location

This commit is contained in:
Corey Goldberg 2016-01-02 11:16:43 -05:00
parent 15d458d5fa
commit c9264d6911
1 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ import os
import fnmatch
import random
import subprocess
import tempfile
import time
@ -85,7 +86,7 @@ class Xvfb:
return display_num
def _lock_files(self):
tmpdir = '/tmp'
tmpdir = tempfile.gettempdir()
pattern = '.X*-lock'
names = fnmatch.filter(os.listdir(tmpdir), pattern)
ls = [os.path.join(tmpdir, child) for child in names]