Skip to content

Commit

Permalink
don't hardcode tmp dir location
Browse files Browse the repository at this point in the history
  • Loading branch information
cgoldberg committed Jan 2, 2016
1 parent 15d458d commit c9264d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xvfbwrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import fnmatch
import random
import subprocess
import tempfile
import time


Expand Down Expand Up @@ -85,7 +86,7 @@ def search_for_free_display(self):
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]
Expand Down

0 comments on commit c9264d6

Please sign in to comment.