[chronojump-server] Added mono_executables_dir to chronojump.conf in api section The mono binaries are executed from thi
- From: Marcos Venteo Garcia <mventeo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump-server] Added mono_executables_dir to chronojump.conf in api section The mono binaries are executed from thi
- Date: Thu, 6 Jul 2017 17:11:29 +0000 (UTC)
commit 15c7d6aa5da7893e1483f11a725243d5fa8d3113
Author: Marcos Venteo GarcĂa <mventeo gmail com>
Date: Thu Jul 6 19:11:20 2017 +0200
Added mono_executables_dir to chronojump.conf in api section
The mono binaries are executed from this directory now
chronojumpserver/__init__.py | 2 ++
chronojumpserver/api.py | 3 ++-
2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/chronojumpserver/__init__.py b/chronojumpserver/__init__.py
index 5cbd69d..83f4d5f 100755
--- a/chronojumpserver/__init__.py
+++ b/chronojumpserver/__init__.py
@@ -24,6 +24,8 @@ app.config['CLUB_NAME'] = config.get("club", "name")
app.secret_key = config.get("security", "secret_key")
app.config['SECRET_KEY'] = app.secret_key
app.config['UPLOAD_FOLDER'] = config.get("api", "photos_dir")
+app.config['MONO_PATH'] = config.get("api", "mono_executables_dir")
+
# Check if the UPLOAD_FOLDER exists
_path = os.path.join('chronojumpserver', app.config['UPLOAD_FOLDER'] )
diff --git a/chronojumpserver/api.py b/chronojumpserver/api.py
index a68916f..b1c7b92 100755
--- a/chronojumpserver/api.py
+++ b/chronojumpserver/api.py
@@ -86,8 +86,9 @@ def register_rfid():
if os.access(rfidFile, os.W_OK):
os.remove(rfidFile)
# Call Mono program to read from RFID Reader
+ mono_path = os.path.join(app.config['MONO_PATH'], 'RFID.exe')
rfidReadedStatus = subprocess.call(
- "mono chronojumpserver/rfid-csharp/RFID.exe", shell=True)
+ "mono %s" % mono_path, shell=True)
print rfidReadedStatus
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]