[elbe-devel] [PATCH 2/2] elbepack: projectmanager: drop current_project_has_changes()

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


This method is not used anymore.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/db.py             | 11 -----------
 elbepack/projectmanager.py |  5 -----
 2 files changed, 16 deletions(-)

diff --git a/elbepack/db.py b/elbepack/db.py
index b3f87aa2712c..bf60afcc61cc 100644
--- a/elbepack/db.py
+++ b/elbepack/db.py
@@ -417,17 +417,6 @@ class ElbeDB:
 
             p.status = new_status
 
-    def has_changes(self, builddir):
-        with session_scope(self.session) as s:
-            try:
-                p = s.query(Project).filter(Project.builddir == builddir). \
-                    one()
-            except NoResultFound:
-                raise ElbeDBError(
-                    f'project {builddir} is not registered in the database')
-
-            return p.status == 'has_changes'
-
     def get_owner_id(self, builddir):
         with session_scope(self.session) as s:
             try:
diff --git a/elbepack/projectmanager.py b/elbepack/projectmanager.py
index e3ad4b571d47..e771acafd26a 100644
--- a/elbepack/projectmanager.py
+++ b/elbepack/projectmanager.py
@@ -277,11 +277,6 @@ class ProjectManager:
 
         ep.repo.finalize()
 
-    def current_project_has_changes(self, userid):
-        with self.lock:
-            builddir = self._get_current_project(userid).builddir
-            return self.db.has_changes(builddir)
-
     def current_project_is_busy(self, userid):
         with self.lock:
             ep = self._get_current_project(userid)

-- 
2.46.0



More information about the elbe-devel mailing list