Commit 66c5ab7a authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

Don't assume current path when getting file

parent 3afdd1c3
...@@ -7,12 +7,13 @@ from ws4py.client import WebSocketBaseClient ...@@ -7,12 +7,13 @@ from ws4py.client import WebSocketBaseClient
from tempfile import NamedTemporaryFile from tempfile import NamedTemporaryFile
import subprocess import subprocess
import json import json
from os.path import abspath from os.path import abspath, join
from threading import Thread from threading import Thread
from hashlib import sha1 from hashlib import sha1
import os import os
import logging import logging
CURPATH = os.path.dirname(os.path.abspath(__file__))
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
...@@ -40,8 +41,8 @@ class GUI(WebSocketBaseClient): ...@@ -40,8 +41,8 @@ class GUI(WebSocketBaseClient):
# subprocess.call blocks the execution # subprocess.call blocks the execution
LOG.debug('RUN: %s' % (fp.name)) LOG.debug('RUN: %s' % (fp.name))
subprocess.call([ subprocess.call([
abspath('agkyra/nwjs/nw'), os.path.join(os.path.join(CURPATH, 'nwjs'), 'nw'),
abspath('agkyra/gui.nw'), os.path.join(CURPATH, 'gui.nw'),
fp.name, fp.name,
'--data-path', abspath('~/.agkyra')]) '--data-path', abspath('~/.agkyra')])
LOG.debug('GUI process closed, remove temp file') LOG.debug('GUI process closed, remove temp file')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment