diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-26 11:25:03 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-26 11:25:03 (GMT) |
commit | d23a83060ddad0b6da5504d8cb5d524891ad9631 (patch) | |
tree | be881c67835922bc9d1c23276047b2f0241679c1 /devbot/xvfb.py | |
parent | bc6035454c6138d0974173900e50e33793b2e5d0 (diff) |
pep8ize
Diffstat (limited to 'devbot/xvfb.py')
-rw-r--r-- | devbot/xvfb.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/devbot/xvfb.py b/devbot/xvfb.py index adc72f0..41110f7 100644 --- a/devbot/xvfb.py +++ b/devbot/xvfb.py @@ -3,14 +3,16 @@ import subprocess from devbot import utils + def _find_free_display(): - for i in range (100, 1000): + 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 + return display + def start(): xvfb_display = _find_free_display() @@ -22,6 +24,7 @@ def start(): return (xvfb_proc, orig_display) + def stop(xvfb_proc, orig_display): if orig_display is not None: os.environ["DISPLAY"] = orig_display |