Browse Source

rename variable for clarity

master
Corey Goldberg 6 years ago
parent
commit
15d458d5fa
  1. 6
      xvfbwrapper.py

6
xvfbwrapper.py

@ -26,13 +26,13 @@ class Xvfb:
msg = 'Can not find Xvfb. Please install it and try again.'
raise EnvironmentError(msg)
self.xvfb_cmd = [
self.xvfb_args = [
'-screen', '0', '%dx%dx%d' %
(self.width, self.height, self.colordepth)
]
for key, value in kwargs.items():
self.xvfb_cmd = self.xvfb_cmd + ['-%s' % key, value]
self.xvfb_args += ['-%s' % key, value]
if 'DISPLAY' in os.environ:
self.old_display_num = os.environ['DISPLAY'].split(':')[1]
@ -50,7 +50,7 @@ class Xvfb:
def start(self):
self.vdisplay_num = self.search_for_free_display()
self.xvfb_cmd = ['Xvfb', ':%d' % self.vdisplay_num] + self.xvfb_cmd
self.xvfb_cmd = ['Xvfb', ':%d' % self.vdisplay_num] + self.xvfb_args
with open(os.devnull, 'w') as fnull:
self.proc = subprocess.Popen(self.xvfb_cmd,

Loading…
Cancel
Save