summaryrefslogtreecommitdiff
path: root/jasper.py
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-09-15 09:50:57 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2014-09-15 09:50:57 +0200
commit85ea0f6d955188a5ad8c51815c623767f08b4055 (patch)
treeab42a07dd03002fffa472ed234e9728e206a5334 /jasper.py
parentf9ea5957e5d484c91668a19765cff2e709f9e3c9 (diff)
downloadjasper-client-85ea0f6d955188a5ad8c51815c623767f08b4055.tar.gz
jasper-client-85ea0f6d955188a5ad8c51815c623767f08b4055.zip
Autodetection of JASPER_HOME
Diffstat (limited to 'jasper.py')
-rwxr-xr-xjasper.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/jasper.py b/jasper.py
index ebc528d..159d962 100755
--- a/jasper.py
+++ b/jasper.py
@@ -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