diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-09-15 09:50:57 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-09-15 09:50:57 +0200 |
| commit | 85ea0f6d955188a5ad8c51815c623767f08b4055 (patch) | |
| tree | ab42a07dd03002fffa472ed234e9728e206a5334 | |
| parent | f9ea5957e5d484c91668a19765cff2e709f9e3c9 (diff) | |
| download | jasper-client-85ea0f6d955188a5ad8c51815c623767f08b4055.tar.gz jasper-client-85ea0f6d955188a5ad8c51815c623767f08b4055.zip | |
Autodetection of JASPER_HOME
| -rwxr-xr-x | jasper.py | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -11,14 +11,8 @@ import yaml import argparse # Set $JASPER_HOME -jasper_home = os.getenv("JASPER_HOME") -if not jasper_home or not os.path.exists(jasper_home): - if os.path.exists("/home/pi"): - jasper_home = "/home/pi" - os.environ["JASPER_HOME"] = jasper_home - else: - print("Error: $JASPER_HOME is not set.") - sys.exit(0) +if not os.getenv('JASPER_HOME'): + os.environ["JASPER_HOME"] = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) from client.diagnose import Diagnostics from client import vocabcompiler, stt |
