[elbe-devel] [PATCH 20/22] elbepack: projectmanager: remove _get_current_project()

Thomas Weißschuh thomas.weissschuh at linutronix.de
Wed Aug 14 15:29:34 CEST 2024


All project references are not retrieved through open_project().
Remove the now unnecessary function.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/projectmanager.py | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/elbepack/projectmanager.py b/elbepack/projectmanager.py
index 25de32911473..5353fbdfd23b 100644
--- a/elbepack/projectmanager.py
+++ b/elbepack/projectmanager.py
@@ -39,11 +39,6 @@ class PermissionDenied(ProjectManagerError):
             self, f'permission denied for project in {builddir}')
 
 
-class NoOpenProject(ProjectManagerError):
-    def __init__(self):
-        ProjectManagerError.__init__(self, 'must open a project first')
-
-
 class InvalidState(ProjectManagerError):
     pass
 
@@ -282,18 +277,6 @@ class ProjectManager:
             msg = read_loggingQ(builddir)
             return self.db.is_busy(builddir), msg
 
-    def _get_current_project(self, userid, allow_busy=True):
-        # Must be called with self.lock held
-        if userid not in self.userid2project:
-            raise NoOpenProject()
-
-        ep = self.userid2project[userid]
-
-        if not allow_busy:
-            self._assert_not_busy(ep)
-
-        return ep
-
     def _assert_not_busy(self, ep):
         if self.db.is_busy(ep.builddir):
             raise InvalidState(f'project {ep.builddir} is busy')

-- 
2.46.0



More information about the elbe-devel mailing list