From c265b429e1898f18cd2fc8686d4dbe9b1867548c Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Wed, 26 Dec 2012 23:05:18 +0000 Subject: Keep public stuff at the top --- (limited to 'devbot') diff --git a/devbot/xvfb.py b/devbot/xvfb.py index 41110f7..35da3ac 100644 --- a/devbot/xvfb.py +++ b/devbot/xvfb.py @@ -4,16 +4,6 @@ import subprocess from devbot import utils -def _find_free_display(): - for i in range(100, 1000): - display = ":%s" % i - result = subprocess.call(args=["xdpyinfo", "--display", display], - stdout=utils.devnull, - stderr=subprocess.STDOUT) - if result > 0: - return display - - def start(): xvfb_display = _find_free_display() xvfb_proc = subprocess.Popen(args=["Xvfb", xvfb_display], @@ -30,3 +20,13 @@ def stop(xvfb_proc, orig_display): os.environ["DISPLAY"] = orig_display xvfb_proc.terminate() + + +def _find_free_display(): + for i in range(100, 1000): + display = ":%s" % i + result = subprocess.call(args=["xdpyinfo", "--display", display], + stdout=utils.devnull, + stderr=subprocess.STDOUT) + if result > 0: + return display -- cgit v0.9.1