[master 05/11] modules: necessary changes to the installclasses import statements.

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

 



---
 pyanaconda/installclass.py          |    5 +++--
 pyanaconda/installclasses/fedora.py |   20 ++++++++++----------
 pyanaconda/installclasses/rhel.py   |   12 ++++++------
 3 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/pyanaconda/installclass.py b/pyanaconda/installclass.py
index 85076a3..3c6a579 100644
--- a/pyanaconda/installclass.py
+++ b/pyanaconda/installclass.py
@@ -257,9 +257,10 @@ def availableClasses(showHidden=0):
 	if done.has_key(mainName): continue
 	done[mainName] = 1
 
+
         try:
             found = imputil.imp.find_module(mainName)
-        except:
+        except ImportError as e:
             log.warning ("module import of %s failed: %s" % (mainName, sys.exc_type))
             continue
 
@@ -279,7 +280,7 @@ def availableClasses(showHidden=0):
                 
             if obj.hidden == 0 or showHidden == 1:
                 list.append(((obj.name, obj, obj.pixmap), sortOrder))
-        except:
+        except ImportError as e:
             log.warning ("module import of %s failed: %s" % (mainName, sys.exc_type))
             if flags.debug: raise
             else: continue
diff --git a/pyanaconda/installclasses/fedora.py b/pyanaconda/installclasses/fedora.py
index 189aa2a..9956ee1 100644
--- a/pyanaconda/installclasses/fedora.py
+++ b/pyanaconda/installclasses/fedora.py
@@ -17,18 +17,18 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-from installclass import BaseInstallClass
-from constants import *
-from product import *
-from flags import flags
-import os, types
-import iutil
+from pyanaconda.installclass import BaseInstallClass
+from pyanaconda.constants import *
+from pyanaconda.product import *
+from pyanaconda.flags import flags
+import pyanaconda.iutil as iutil
 
+import os, types
 import gettext
 _ = lambda x: gettext.ldgettext("anaconda", x)
 
-import installmethod
-import yuminstall
+import pyanaconda.installmethod as installmethod
+import pyanaconda.yuminstall as yuminstall
 
 import rpmUtils.arch
 
@@ -84,8 +84,8 @@ class InstallClass(BaseInstallClass):
 
     def getBackend(self):
         if flags.livecdInstall:
-            import livecd
-            return livecd.LiveCDCopyBackend
+            import pyanaconda.livecd
+            return pyanaconda.livecd.LiveCDCopyBackend
         else:
             return yuminstall.YumBackend
 
diff --git a/pyanaconda/installclasses/rhel.py b/pyanaconda/installclasses/rhel.py
index bcb592b..62f5197 100644
--- a/pyanaconda/installclasses/rhel.py
+++ b/pyanaconda/installclasses/rhel.py
@@ -17,15 +17,15 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-from installclass import BaseInstallClass
-from constants import *
-from product import *
-from flags import flags
+from pyanaconda.installclass import BaseInstallClass
+from pyanaconda.constants import *
+from pyanaconda.product import *
+from pyanaconda.flags import flags
 import os
 import types
 
-import installmethod
-import yuminstall
+import pyanaconda.installmethod as installmethod
+import pyanaconda.yuminstall as yuminstall
 
 class InstallClass(BaseInstallClass):
     # name has underscore used for mnemonics, strip if you dont need it
-- 
1.7.0.1

_______________________________________________
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