deprecation warnings: only show when running from source
This commit is contained in:
@@ -35,13 +35,16 @@ _min_python_version_tuple = tuple(map(int, (MIN_PYTHON_VERSION.split("."))))
|
|||||||
if sys.version_info[:3] < _min_python_version_tuple:
|
if sys.version_info[:3] < _min_python_version_tuple:
|
||||||
sys.exit("Error: Electrum requires Python version >= %s..." % MIN_PYTHON_VERSION)
|
sys.exit("Error: Electrum requires Python version >= %s..." % MIN_PYTHON_VERSION)
|
||||||
|
|
||||||
warnings.simplefilter('default', DeprecationWarning)
|
|
||||||
|
|
||||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||||
is_bundle = getattr(sys, 'frozen', False)
|
is_bundle = getattr(sys, 'frozen', False)
|
||||||
is_local = not is_bundle and os.path.exists(os.path.join(script_dir, "electrum.desktop"))
|
is_local = not is_bundle and os.path.exists(os.path.join(script_dir, "electrum.desktop"))
|
||||||
is_android = 'ANDROID_DATA' in os.environ
|
is_android = 'ANDROID_DATA' in os.environ
|
||||||
|
|
||||||
|
if is_local: # running from source
|
||||||
|
# developers should probably see all deprecation warnings.
|
||||||
|
warnings.simplefilter('default', DeprecationWarning)
|
||||||
|
|
||||||
# move this back to gui/kivy/__init.py once plugins are moved
|
# move this back to gui/kivy/__init.py once plugins are moved
|
||||||
os.environ['KIVY_DATA_DIR'] = os.path.abspath(os.path.dirname(__file__)) + '/electrum/gui/kivy/data/'
|
os.environ['KIVY_DATA_DIR'] = os.path.abspath(os.path.dirname(__file__)) + '/electrum/gui/kivy/data/'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user