[PATCH 3/5] If repo setup fails, also make sure to delete it from yum.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 iw/task_gui.py |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/iw/task_gui.py b/iw/task_gui.py
index 7b37ed7..29fc82e 100644
--- a/iw/task_gui.py
+++ b/iw/task_gui.py
@@ -368,13 +368,10 @@ class RepoEditor:
             self.repo = newRepoObj
 
             type = self.typeComboBox.get_active()
-            if not applyFuncs[type](self.repo):
-                continue
-
-            if not self._enableRepo():
-                continue
-
-            if not setupRepo(self.anaconda, self.repo):
+            if not applyFuncs[type](self.repo) or not self._enableRepo() or not \
+                   setupRepo(self.anaconda, self.repo):
+                self.repo.close()
+                self.anaconda.backend.ayum.repos.delete(self.repo.id)
                 continue
 
             break
-- 
1.6.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux