From 93bbc39d4bcafbf7783a5aa692a96209962ea392 Mon Sep 17 00:00:00 2001 From: Roberto Hueso Gómez Date: Mon, 8 Jun 2020 13:39:48 +0200 Subject: Import OgLinuxOperations only when necessary This fixes a circular import error produced by the import of ogClient inside of OgLinuxOperations. --- src/ogRest.py | 3 +-- 1 file changed, 1 insertion(+), 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 \ -- cgit v1.2.3-18-g5258