Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
agkyra
Commits
66c5ab7a
Commit
66c5ab7a
authored
May 04, 2015
by
Giorgos Korfiatis
Browse files
Don't assume current path when getting file
parent
3afdd1c3
Changes
1
Show whitespace changes
Inline
Side-by-side
agkyra/agkyra/gui.py
View file @
66c5ab7a
...
...
@@ -7,12 +7,13 @@ from ws4py.client import WebSocketBaseClient
from
tempfile
import
NamedTemporaryFile
import
subprocess
import
json
from
os.path
import
abspath
from
os.path
import
abspath
,
join
from
threading
import
Thread
from
hashlib
import
sha1
import
os
import
logging
CURPATH
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
LOG
=
logging
.
getLogger
(
__name__
)
...
...
@@ -40,8 +41,8 @@ class GUI(WebSocketBaseClient):
# subprocess.call blocks the execution
LOG
.
debug
(
'RUN: %s'
%
(
fp
.
name
))
subprocess
.
call
([
abspath
(
'agkyra/nwjs/
nw'
),
abs
path
(
'agkyra/
gui.nw'
),
os
.
path
.
join
(
os
.
path
.
join
(
CURPATH
,
'nwjs'
),
'
nw'
),
os
.
path
.
join
(
CURPATH
,
'
gui.nw'
),
fp
.
name
,
'--data-path'
,
abspath
(
'~/.agkyra'
)])
LOG
.
debug
(
'GUI process closed, remove temp file'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment