summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2020-06-08 13:39:48 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-06-08 14:26:35 +0200
commit93bbc39d4bcafbf7783a5aa692a96209962ea392 (patch)
tree91c769e1db8445c172f23399ffe5b0d459c55c94
parent1377aceec23fdb0efc4e1406ee308e1377d36065 (diff)
Import OgLinuxOperations only when necessary
This fixes a circular import error produced by the import of ogClient inside of OgLinuxOperations.
-rw-r--r--src/ogRest.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ogRest.py b/src/ogRest.py
index 9f6a7e6..0578a82 100644
--- a/src/ogRest.py
+++ b/src/ogRest.py
@@ -18,8 +18,6 @@ import signal
from src.restRequest import *
-from src.linux.ogOperations import OgLinuxOperations
-
class ThreadState(Enum):
IDLE = 0
BUSY = 1
@@ -239,6 +237,7 @@ class ogRest():
self.samba_config = self.CONFIG['samba']
if self.mode == 'live':
+ from src.linux.ogOperations import OgLinuxOperations
self.operations = OgLinuxOperations(self.CONFIG)
elif self.mode == 'virtual':
from src.virtual.ogOperations import \