Browse Source

detect system-wide twister-html

miguelfreitas
Miguel Freitas 10 years ago
parent
commit
ad6b05d97c
  1. 8
      twister-control.py

8
twister-control.py

@ -70,12 +70,16 @@ def getBrowser():
return webbrowser return webbrowser
def daemon(): def daemon():
twisterdArgs = ["-daemon"]
systemHtmlDir = '/usr/share/twister/html'
if os.path.exists(systemHtmlDir):
twisterdArgs += ['-htmldir='+systemHtmlDir]
try: try:
call(["twisterd", "-daemon"]) call(["twisterd"] + twisterdArgs)
except: except:
try: try:
twisterd = os.path.dirname(os.path.realpath(sys.argv[0])) + "/twisterd" twisterd = os.path.dirname(os.path.realpath(sys.argv[0])) + "/twisterd"
call([twisterd, "-daemon"]) call([twisterd] + twisterdArgs)
except: except:
print "running 'twisterd' failed. check if installed and PATH is correctly configured" print "running 'twisterd' failed. check if installed and PATH is correctly configured"

Loading…
Cancel
Save