summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/linux/ogOperations.py10
-rw-r--r--src/ogRest.py2
2 files changed, 5 insertions, 7 deletions
diff --git a/src/linux/ogOperations.py b/src/linux/ogOperations.py
index db37326..3638268 100644
--- a/src/linux/ogOperations.py
+++ b/src/linux/ogOperations.py
@@ -7,18 +7,16 @@
#
import os
+import json
import subprocess
from src.ogConfig import *
OG_SHELL = '/bin/bash'
class OgLinuxOperations:
-
- _ogconfig = ogConfig()
- _config_path = f'{ogConfig.OG_PATH}ogclient/cfg/ogclient.cfg'
- _ogconfig.parser_file(_config_path)
- _url = _ogconfig.get_value_section('opengnsys', 'url')
- _url_log = _ogconfig.get_value_section('opengnsys', 'url_log')
+ def __init__(self, config):
+ _url = config['opengnsys']['url']
+ _url_log = config['opengnsys']['url_log']
def _restartBrowser(self, url):
try:
diff --git a/src/ogRest.py b/src/ogRest.py
index 64558a2..01a3050 100644
--- a/src/ogRest.py
+++ b/src/ogRest.py
@@ -251,7 +251,7 @@ class ogRest():
self.samba_config = self.CONFIG['samba']
if self.mode == 'linux':
- self.operations = OgLinuxOperations()
+ self.operations = OgLinuxOperations(self.CONFIG)
elif self.mode == 'virtual':
self.operations = OgVirtualOperations()
threading.Thread(target=ogThread.check_vm_state_loop,