Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Using subprocess.call to call xvfb-run and separated args because tha…

…t seemed to make it crash
  • Loading branch information...
commit cb22ab4105adca3d5fcd1eab934f5c4b84b1b2e7 1 parent 1b104f9
@adamn authored
Showing with 6 additions and 3 deletions.
  1. +2 −0  .gitignore
  2. +4 −3 webkit2png.py
View
2  .gitignore
@@ -0,0 +1,2 @@
+*.png
+*.log
View
7 webkit2png.py
@@ -27,6 +27,7 @@
import sys
import signal
import os
+import subprocess
import logging
import time
@@ -408,7 +409,7 @@ def init_qtgui(display=None, style=None, qtargs=[]):
if options.xvfb:
# Start 'xvfb' instance by replacing the current process
- newArgs = ["xvfb-run", "--auto-servernum --server-args=-screen 0, %dx%dx24" % options.xvfb, sys.argv[0]]
+ newArgs = ["xvfb-run", "--auto-servernum", "--server-args=-screen 0, %dx%dx24" % options.xvfb, sys.argv[0]]
skipArgs = 0
for i in range(1, len(sys.argv)):
if skipArgs > 0:
@@ -418,7 +419,7 @@ def init_qtgui(display=None, style=None, qtargs=[]):
else:
newArgs.append(sys.argv[i])
logger.debug("Executing %s" % " ".join(newArgs))
- os.execvp(newArgs[0], newArgs)
+ subprocess.call(newArgs)
raise RuntimeError("Failed to execute '%s'" % newArgs[0])
# Prepare outout ("1" means STDOUT)
@@ -427,7 +428,7 @@ def init_qtgui(display=None, style=None, qtargs=[]):
else:
options.output = open(options.output, "w")
- logger.debug("Version %s, Pythion %s, Qt %s", VERSION, sys.version, qVersion());
+ logger.debug("Version %s, Python %s, Qt %s", VERSION, sys.version, qVersion());
# Technically, this is a QtGui application, because QWebPage requires it
# to be. But because we will have no user interaction, and rendering can
Please sign in to comment.
Something went wrong with that request. Please try again.