mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-16 01:00:42 +03:00
chdir() to __file__ when not running frozen
This commit is contained in:
parent
103e856446
commit
0b88117844
@ -6,6 +6,7 @@ import argparse
|
||||
import html
|
||||
import json
|
||||
import locale
|
||||
import pathlib
|
||||
import re
|
||||
import sys
|
||||
import webbrowser
|
||||
@ -27,6 +28,11 @@ if getattr(sys, 'frozen', False):
|
||||
environ['TCL_LIBRARY'] = join(dirname(sys.path[0]), 'lib', 'tcl')
|
||||
environ['TK_LIBRARY'] = join(dirname(sys.path[0]), 'lib', 'tk')
|
||||
|
||||
else:
|
||||
# We still want to *try* to have CWD be where the main script is, even if
|
||||
# not frozen.
|
||||
chdir(pathlib.Path(__file__).parent)
|
||||
|
||||
from constants import applongname, appname, protocolhandler_redirect
|
||||
|
||||
# config will now cause an appname logger to be set up, so we need the
|
||||
|
Loading…
x
Reference in New Issue
Block a user