Commit 03f1d879 authored by Saul Ibarra's avatar Saul Ibarra

Added workaround for __file__ since it can't be used with py2exe

parent 3381362d
......@@ -5,6 +5,10 @@ import sys
# We need to mangle Python's import path in case blink is run directly from
# the bin/ directory.
try:
__file__
except NameError:
__file__ = file = sys.argv[0]
script_dir = os.path.dirname(os.path.realpath(__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')):
......
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