Skip to content
This repository has been archived by the owner on Jul 4, 2020. It is now read-only.

Commit

Permalink
check that Dash was imported correctly and sys.exit if failed
Browse files Browse the repository at this point in the history
  • Loading branch information
ned2 authored and chriddyp committed Mar 30, 2018
1 parent 68f214a commit 6b1d002
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion init/{{packageNameUnderscored}}/__init__.py
@@ -1,8 +1,17 @@
from __future__ import print_function as _

import os as _os
import dash as _dash
import sys as _sys

import dash as _dash

from .version import __version__

if not hasattr(_dash, 'development'):
print("Dash was not successfully imported. Make sure you don't have a file "
"named \n'dash.py' in your current directory.", file=_sys.stderr)
_sys.exit(1)

_current_path = _os.path.dirname(_os.path.abspath(__file__))

_components = _dash.development.component_loader.load_components(
Expand Down

0 comments on commit 6b1d002

Please sign in to comment.