Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
d254ec96
Commit
d254ec96
authored
Jan 13, 2016
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified code
parent
856b5c21
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
blink
bin/blink
+4
-3
__init__.py
blink/__init__.py
+1
-1
No files found.
bin/blink
View file @
d254ec96
...
...
@@ -3,10 +3,11 @@
import
os
import
sys
frozen
=
hasattr
(
sys
,
'frozen'
)
# We need to mangle Python's import path in case blink is run directly from
# the bin/ directory.
script
=
globals
()
.
get
(
'__file__'
,
sys
.
argv
[
0
])
script_dir
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
script
))
script_dir
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
sys
.
executable
if
frozen
else
__file__
))
parent_dir
=
os
.
path
.
dirname
(
script_dir
)
if
os
.
path
.
basename
(
script_dir
)
==
'bin'
and
os
.
path
.
exists
(
os
.
path
.
join
(
parent_dir
,
'blink'
,
'__init__.py'
)):
# Insert the parent path just before the existing script's path. We need
...
...
@@ -20,7 +21,7 @@ if os.path.basename(script_dir) == 'bin' and os.path.exists(os.path.join(parent_
sys
.
path
.
insert
(
position
,
parent_dir
)
if
getattr
(
sys
,
'frozen'
,
False
)
:
if
frozen
:
from
StringIO
import
StringIO
sys
.
stdout
=
sys
.
stderr
=
StringIO
()
...
...
blink/__init__.py
View file @
d254ec96
...
...
@@ -58,7 +58,7 @@ from blink.update import UpdateManager
from
blink.util
import
QSingleton
,
run_in_gui_thread
if
getattr
(
sys
,
'frozen'
,
False
):
if
hasattr
(
sys
,
'frozen'
):
output
=
sys
.
stdout
makedirs
(
ApplicationData
.
get
(
'logs'
))
sys
.
stdout
=
sys
.
stderr
=
open
(
ApplicationData
.
get
(
'logs/output.log'
),
'a'
)
...
...
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